diff options
author | Chris Lattner <sabre@nondot.org> | 2007-07-15 20:42:37 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2007-07-15 20:42:37 +0000 |
commit | a0141b90a34da612e348e2c7af41ec571a6fd143 (patch) | |
tree | 231f1bc421b1f0dd0f414fece8bba7e9015926da /test | |
parent | 28753f8df2921fa9e9d60717c2078c826ea82bb4 (diff) | |
download | llvm-a0141b90a34da612e348e2c7af41ec571a6fd143.tar.gz llvm-a0141b90a34da612e348e2c7af41ec571a6fd143.tar.bz2 llvm-a0141b90a34da612e348e2c7af41ec571a6fd143.tar.xz |
Implement shift-simplify.ll:test3, turning:
(X << 31) <s 0 --> (X&1) != 0
This happens dozens of times in the CFE.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@39879 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test')
-rw-r--r-- | test/Transforms/InstCombine/shift-simplify.ll | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/test/Transforms/InstCombine/shift-simplify.ll b/test/Transforms/InstCombine/shift-simplify.ll index 639c3fae5c..4c84612748 100644 --- a/test/Transforms/InstCombine/shift-simplify.ll +++ b/test/Transforms/InstCombine/shift-simplify.ll @@ -21,3 +21,10 @@ define i32 @test2(i32 %A, i32 %B, i32 %C) { %Z = xor i32 %X, %Y ret i32 %Z } + +define i1 @test3(i32 %X) { + %tmp1 = shl i32 %X, 7 + %tmp2 = icmp slt i32 %tmp1, 0 + ret i1 %tmp2 +} + |