diff options
author | Chris Lattner <sabre@nondot.org> | 2008-05-09 05:19:28 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2008-05-09 05:19:28 +0000 |
commit | 7d2cbd2d43c389c0d067d30683ffefb6e4edde66 (patch) | |
tree | 71ad36f0d26b336f72cb92aa0fe7369fa7332503 /test/Transforms/InstCombine/not.ll | |
parent | 94019f8e064bf84085b44c35ab0c1efb76fb94f7 (diff) | |
download | llvm-7d2cbd2d43c389c0d067d30683ffefb6e4edde66.tar.gz llvm-7d2cbd2d43c389c0d067d30683ffefb6e4edde66.tar.bz2 llvm-7d2cbd2d43c389c0d067d30683ffefb6e4edde66.tar.xz |
Implement PR2298. This transforms:
~x < ~y --> y < x
-x == -y --> x == y
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50882 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Transforms/InstCombine/not.ll')
-rw-r--r-- | test/Transforms/InstCombine/not.ll | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/test/Transforms/InstCombine/not.ll b/test/Transforms/InstCombine/not.ll index 757e1de940..a79e518718 100644 --- a/test/Transforms/InstCombine/not.ll +++ b/test/Transforms/InstCombine/not.ll @@ -42,3 +42,13 @@ define i32 @test5(i32 %A, i32 %B) { ret i32 %d } +; PR2298 +define i8 @test6(i32 %a, i32 %b) zeroext nounwind { +entry: + %tmp1not = xor i32 %a, -1 ; <i32> [#uses=1] + %tmp2not = xor i32 %b, -1 ; <i32> [#uses=1] + %tmp3 = icmp slt i32 %tmp1not, %tmp2not ; <i1> [#uses=1] + %retval67 = zext i1 %tmp3 to i8 ; <i8> [#uses=1] + ret i8 %retval67 +} + |