diff options
author | Nick Lewycky <nicholas@mxc.ca> | 2008-07-09 07:29:11 +0000 |
---|---|---|
committer | Nick Lewycky <nicholas@mxc.ca> | 2008-07-09 07:29:11 +0000 |
commit | 9ee863ecc00ff191bfec3f1421d80b41989f4413 (patch) | |
tree | 05b966209bbd8d3a72fcf2d780ce14acbe9ea921 /test/Transforms/InstCombine/2008-07-08-AndICmp.ll | |
parent | 1afe5c3ff8f37a94e47379ff9535b5e03faca020 (diff) | |
download | external_llvm-9ee863ecc00ff191bfec3f1421d80b41989f4413.zip external_llvm-9ee863ecc00ff191bfec3f1421d80b41989f4413.tar.gz external_llvm-9ee863ecc00ff191bfec3f1421d80b41989f4413.tar.bz2 |
Fold (a < 8) && (b < 8) into (a|b) < 8 for unsigned less or greater than.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53282 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Transforms/InstCombine/2008-07-08-AndICmp.ll')
-rw-r--r-- | test/Transforms/InstCombine/2008-07-08-AndICmp.ll | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/test/Transforms/InstCombine/2008-07-08-AndICmp.ll b/test/Transforms/InstCombine/2008-07-08-AndICmp.ll new file mode 100644 index 0000000..c600241 --- /dev/null +++ b/test/Transforms/InstCombine/2008-07-08-AndICmp.ll @@ -0,0 +1,10 @@ +; RUN: llvm-as < %s | opt -instcombine | llvm-dis | grep icmp | count 1 +; PR2330 + +define i1 @foo(i32 %a, i32 %b) nounwind { +entry: + icmp ult i32 %a, 8 ; <i1>:0 [#uses=1] + icmp ult i32 %b, 8 ; <i1>:1 [#uses=1] + and i1 %1, %0 ; <i1>:2 [#uses=1] + ret i1 %2 +} |