diff options
author | Nick Lewycky <nicholas@mxc.ca> | 2013-07-13 01:16:47 +0000 |
---|---|---|
committer | Nick Lewycky <nicholas@mxc.ca> | 2013-07-13 01:16:47 +0000 |
commit | 75681bb302e524460edb7c8c5c6e98792b5027a2 (patch) | |
tree | 1ce2531e7f274d9103d2cbd502a74b0453d70ee3 /test | |
parent | 12c74dc2c2ee306f60fb39a9b2a43000e23addcc (diff) | |
download | llvm-75681bb302e524460edb7c8c5c6e98792b5027a2.tar.gz llvm-75681bb302e524460edb7c8c5c6e98792b5027a2.tar.bz2 llvm-75681bb302e524460edb7c8c5c6e98792b5027a2.tar.xz |
Add a microoptimization for urem.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186235 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test')
-rw-r--r-- | test/Transforms/InstCombine/rem.ll | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/test/Transforms/InstCombine/rem.ll b/test/Transforms/InstCombine/rem.ll index 808d51eba1..c6fd721199 100644 --- a/test/Transforms/InstCombine/rem.ll +++ b/test/Transforms/InstCombine/rem.ll @@ -163,3 +163,12 @@ define i32 @test16(i32 %x, i32 %y) { %rem = urem i32 %x, %add ret i32 %rem } + +define i32 @test17(i32 %X) { +; CHECK: @test17 +; CHECK-NEXT: icmp ne i32 %X, 1 +; CHECK-NEXT: zext i1 +; CHECK-NEXT: ret + %A = urem i32 1, %X + ret i32 %A +} |