diff options
author | Stephen Hines <srhines@google.com> | 2014-05-29 02:49:00 -0700 |
---|---|---|
committer | Stephen Hines <srhines@google.com> | 2014-05-29 02:49:00 -0700 |
commit | dce4a407a24b04eebc6a376f8e62b41aaa7b071f (patch) | |
tree | dcebc53f2b182f145a2e659393bf9a0472cedf23 /test/CodeGen/X86/cmp.ll | |
parent | 220b921aed042f9e520c26cffd8282a94c66c3d5 (diff) | |
download | external_llvm-dce4a407a24b04eebc6a376f8e62b41aaa7b071f.zip external_llvm-dce4a407a24b04eebc6a376f8e62b41aaa7b071f.tar.gz external_llvm-dce4a407a24b04eebc6a376f8e62b41aaa7b071f.tar.bz2 |
Update LLVM for 3.5 rebase (r209712).
Change-Id: I149556c940fb7dc92d075273c87ff584f400941f
Diffstat (limited to 'test/CodeGen/X86/cmp.ll')
-rw-r--r-- | test/CodeGen/X86/cmp.ll | 45 |
1 files changed, 40 insertions, 5 deletions
diff --git a/test/CodeGen/X86/cmp.ll b/test/CodeGen/X86/cmp.ll index 551d9bc..cdcdc96 100644 --- a/test/CodeGen/X86/cmp.ll +++ b/test/CodeGen/X86/cmp.ll @@ -26,9 +26,22 @@ cond_true: ; preds = %0 ReturnBlock: ; preds = %0 ret i32 0 ; CHECK-LABEL: test2: -; CHECK: movl (%rsi), %eax -; CHECK: shll $3, %eax -; CHECK: testl %eax, %eax +; CHECK: testl $536870911, (%rsi) +} + +define i8 @test2b(i8 %X, i8* %y) nounwind { + %tmp = load i8* %y ; <i8> [#uses=1] + %tmp1 = shl i8 %tmp, 3 ; <i8> [#uses=1] + %tmp1.upgrd.2 = icmp eq i8 %tmp1, 0 ; <i1> [#uses=1] + br i1 %tmp1.upgrd.2, label %ReturnBlock, label %cond_true + +cond_true: ; preds = %0 + ret i8 1 + +ReturnBlock: ; preds = %0 + ret i8 0 +; CHECK-LABEL: test2b: +; CHECK: testb $31, (%rsi) } define i64 @test3(i64 %x) nounwind { @@ -68,8 +81,8 @@ define i32 @test5(double %A) nounwind { bb12:; preds = %entry ret i32 32 ; CHECK-LABEL: test5: -; CHECK: ucomisd LCPI4_0(%rip), %xmm0 -; CHECK: ucomisd LCPI4_1(%rip), %xmm0 +; CHECK: ucomisd LCPI5_0(%rip), %xmm0 +; CHECK: ucomisd LCPI5_1(%rip), %xmm0 } declare i32 @foo(...) @@ -163,3 +176,25 @@ define i32 @test12() uwtable ssp { } declare zeroext i1 @test12b() + +define i32 @test13(i32 %mask, i32 %base, i32 %intra) { + %and = and i32 %mask, 8 + %tobool = icmp ne i32 %and, 0 + %cond = select i1 %tobool, i32 %intra, i32 %base + ret i32 %cond + +; CHECK-LABEL: test13: +; CHECK: testb $8, %dil +; CHECK: cmovnel +} + +define i32 @test14(i32 %mask, i32 %base, i32 %intra) #0 { + %s = lshr i32 %mask, 7 + %tobool = icmp sgt i32 %s, -1 + %cond = select i1 %tobool, i32 %intra, i32 %base + ret i32 %cond + +; CHECK-LABEL: test14: +; CHECK: shrl $7, %edi +; CHECK-NEXT: cmovnsl %edx, %esi +} |