31 lines · plain
1; Verify that we do not crash on always-true conditions2;3; RUN: llc < %s -mtriple=s390x-linux-gnu -mcpu=z10 -O04;5; This test was compiled using clang -O0 from the following source code:6;7; int test(unsigned long x)8; {9; return x >= 0 && x <= 15;10; }11 12define signext i32 @test(i64 %x) {13entry:14 %x.addr = alloca i64, align 815 store i64 %x, ptr %x.addr, align 816 %0 = load i64, ptr %x.addr, align 817 %cmp = icmp uge i64 %0, 018 br i1 %cmp, label %land.rhs, label %land.end19 20land.rhs: ; preds = %entry21 %1 = load i64, ptr %x.addr, align 822 %cmp1 = icmp ule i64 %1, 1523 br label %land.end24 25land.end: ; preds = %land.rhs, %entry26 %2 = phi i1 [ false, %entry ], [ %cmp1, %land.rhs ]27 %land.ext = zext i1 %2 to i3228 ret i32 %land.ext29}30 31