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 | f9c27c343af24281ba330133ff96e5b3d11489a8 (patch) | |
| tree | 6e66ec0d236bb7f587a498261d92695cd55197e5 /llvm/test/Transforms | |
| parent | 7898e980262b7dd2fb5b1cc4a0735f41fdf3ab71 (diff) | |
| download | bcm5719-llvm-f9c27c343af24281ba330133ff96e5b3d11489a8.tar.gz bcm5719-llvm-f9c27c343af24281ba330133ff96e5b3d11489a8.zip | |
Fold (a < 8) && (b < 8) into (a|b) < 8 for unsigned less or greater than.
llvm-svn: 53282
Diffstat (limited to 'llvm/test/Transforms')
| -rw-r--r-- | llvm/test/Transforms/InstCombine/2008-07-08-AndICmp.ll | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/llvm/test/Transforms/InstCombine/2008-07-08-AndICmp.ll b/llvm/test/Transforms/InstCombine/2008-07-08-AndICmp.ll new file mode 100644 index 00000000000..c6002413147 --- /dev/null +++ b/llvm/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 +} |

