diff options
Diffstat (limited to 'test/CodeGen/X86/shrink-compare.ll')
-rw-r--r-- | test/CodeGen/X86/shrink-compare.ll | 29 |
1 files changed, 26 insertions, 3 deletions
diff --git a/test/CodeGen/X86/shrink-compare.ll b/test/CodeGen/X86/shrink-compare.ll index 83793f0..bb89201 100644 --- a/test/CodeGen/X86/shrink-compare.ll +++ b/test/CodeGen/X86/shrink-compare.ll @@ -15,7 +15,7 @@ if.then: if.end: ret void -; CHECK: test1: +; CHECK-LABEL: test1: ; CHECK: cmpb $47, (%{{rdi|rcx}}) } @@ -31,7 +31,7 @@ if.then: if.end: ret void -; CHECK: test2: +; CHECK-LABEL: test2: ; CHECK: cmpb $47, %{{dil|cl}} } @@ -47,7 +47,7 @@ if.then: if.end: ret void -; CHECK: test3: +; CHECK-LABEL: test3: ; CHECK: cmpb $-1, %{{dil|cl}} } @@ -66,3 +66,26 @@ lor.end: ; preds = %lor.rhs, %entry %p = phi i1 [ true, %entry ], [ %tobool1, %lor.rhs ] ret i1 %p } + +@x = global { i8, i8, i8, i8, i8, i8, i8, i8 } { i8 1, i8 0, i8 0, i8 0, i8 1, i8 0, i8 0, i8 1 }, align 4 + +; PR16551 +define void @test5(i32 %X) nounwind { +entry: + %bf.load = load i56* bitcast ({ i8, i8, i8, i8, i8, i8, i8, i8 }* @x to i56*), align 4 + %bf.lshr = lshr i56 %bf.load, 32 + %bf.cast = trunc i56 %bf.lshr to i32 + %cmp = icmp ne i32 %bf.cast, 1 + br i1 %cmp, label %if.then, label %if.end + +if.then: + tail call void @bar() nounwind + br label %if.end + +if.end: + ret void + +; CHECK-LABEL: test5: +; CHECK-NOT: cmpl $1,{{.*}}x+4 +; CHECK: ret +} |