diff options
author | Chris Lattner <sabre@nondot.org> | 2008-05-16 02:59:42 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2008-05-16 02:59:42 +0000 |
commit | cefb36c13e506b94c55c53f229b350cc6329d406 (patch) | |
tree | fed507f5c323d37b96c0f2e22c411161f71023dd /test/Transforms | |
parent | a69bb5619863fd163fcc38466a4e86c235d4b358 (diff) | |
download | external_llvm-cefb36c13e506b94c55c53f229b350cc6329d406.zip external_llvm-cefb36c13e506b94c55c53f229b350cc6329d406.tar.gz external_llvm-cefb36c13e506b94c55c53f229b350cc6329d406.tar.bz2 |
implement PR2328.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51176 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Transforms')
-rw-r--r-- | test/Transforms/InstCombine/div.ll | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/test/Transforms/InstCombine/div.ll b/test/Transforms/InstCombine/div.ll index b21d39b..ea6ea63 100644 --- a/test/Transforms/InstCombine/div.ll +++ b/test/Transforms/InstCombine/div.ll @@ -1,8 +1,6 @@ ; This test makes sure that div instructions are properly eliminated. -; ; RUN: llvm-as < %s | opt -instcombine | llvm-dis | not grep div -; END. define i32 @test1(i32 %A) { %B = sdiv i32 %A, 1 ; <i32> [#uses=1] @@ -72,3 +70,15 @@ define i32 @test11(i32 %X, i1 %C) { %B = udiv i32 %X, %A ; <i32> [#uses=1] ret i32 %B } + +; PR2328 +define i32 @test12(i32 %x) nounwind { + %tmp3 = udiv i32 %x, %x ; 1 + ret i32 %tmp3 +} + +define i32 @test13(i32 %x) nounwind { + %tmp3 = sdiv i32 %x, %x ; 1 + ret i32 %tmp3 +} + |