Home | History | Annotate | Download | only in SystemZ
      1 ; Verify that we do not crash on always-true conditions
      2 ;
      3 ; RUN: llc < %s -mtriple=s390x-linux-gnu -mcpu=z10 -O0
      4 ;
      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 
     12 define signext i32 @test(i64 %x) {
     13 entry:
     14   %x.addr = alloca i64, align 8
     15   store i64 %x, i64* %x.addr, align 8
     16   %0 = load i64, i64* %x.addr, align 8
     17   %cmp = icmp uge i64 %0, 0
     18   br i1 %cmp, label %land.rhs, label %land.end
     19 
     20 land.rhs:                                         ; preds = %entry
     21   %1 = load i64, i64* %x.addr, align 8
     22   %cmp1 = icmp ule i64 %1, 15
     23   br label %land.end
     24 
     25 land.end:                                         ; preds = %land.rhs, %entry
     26   %2 = phi i1 [ false, %entry ], [ %cmp1, %land.rhs ]
     27   %land.ext = zext i1 %2 to i32
     28   ret i32 %land.ext
     29 }
     30 
     31