aboutsummaryrefslogtreecommitdiff
path: root/test/Transforms/InstCombine/div.ll
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2004-04-26 14:01:47 +0000
committerChris Lattner <sabre@nondot.org>2004-04-26 14:01:47 +0000
commitdb05858ba10627be0b9fdfb5b3d377e0b1c629c4 (patch)
treeb6915fcd40f770433b00b8d80cfe403534f68ee9 /test/Transforms/InstCombine/div.ll
parent3ca4fccac56d67206dbc25fc4850273c52bec8a6 (diff)
Add a new testcase for X/-1, fix bug that prevented tests from running right
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13171 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Transforms/InstCombine/div.ll')
-rw-r--r--test/Transforms/InstCombine/div.ll7
1 files changed, 6 insertions, 1 deletions
diff --git a/test/Transforms/InstCombine/div.ll b/test/Transforms/InstCombine/div.ll
index 01fcf7f9dc..52511a7943 100644
--- a/test/Transforms/InstCombine/div.ll
+++ b/test/Transforms/InstCombine/div.ll
@@ -12,10 +12,15 @@ int %test1(int %A) {
uint %test2(uint %A) {
%B = div uint %A, 8 ; => Shift
- ret int %B
+ ret uint %B
}
int %test3(int %A) {
%B = div int 0, %A ; => 0, don't need to keep traps
ret int %B
}
+
+int %test4(int %A) {
+ %B = div int %A, -1 ; 0-A
+ ret int %B
+}