diff options
author | Benjamin Kramer <benny.kra@googlemail.com> | 2014-04-24 20:51:37 +0000 |
---|---|---|
committer | Benjamin Kramer <benny.kra@googlemail.com> | 2014-04-24 20:51:37 +0000 |
commit | fda5e19b96afdc33d16b9b006e703d8fe91801fa (patch) | |
tree | aff985625061ebc5fb3648024cb1fda54ba1049d /test | |
parent | 1ce40b302d9fde603e24802153790fab57505638 (diff) | |
download | llvm-fda5e19b96afdc33d16b9b006e703d8fe91801fa.tar.gz llvm-fda5e19b96afdc33d16b9b006e703d8fe91801fa.tar.bz2 llvm-fda5e19b96afdc33d16b9b006e703d8fe91801fa.tar.xz |
X86: Don't transform shifts into ands when the sign bit is tested.
Should unbreak MultiSource/Benchmarks/mediabench/g721/g721encode/encode.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207145 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test')
-rw-r--r-- | test/CodeGen/X86/cmp.ll | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/test/CodeGen/X86/cmp.ll b/test/CodeGen/X86/cmp.ll index c52197f9be..cdcdc963ed 100644 --- a/test/CodeGen/X86/cmp.ll +++ b/test/CodeGen/X86/cmp.ll @@ -187,3 +187,14 @@ define i32 @test13(i32 %mask, i32 %base, i32 %intra) { ; 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 +} |