summaryrefslogtreecommitdiff
path: root/test/Transforms/InstSimplify
diff options
context:
space:
mode:
authorDuncan Sands <baldrick@free.fr>2011-02-02 20:52:00 +0000
committerDuncan Sands <baldrick@free.fr>2011-02-02 20:52:00 +0000
commit4b720718fbda1194f925e0a9d931bc220e8b0e3a (patch)
tree4580e5c6f9c1fb68da8f79d786218f13665453f9 /test/Transforms/InstSimplify
parent79fcb6dec3e6e30a30835ebc781e5abc275e12e9 (diff)
downloadllvm-4b720718fbda1194f925e0a9d931bc220e8b0e3a.tar.gz
llvm-4b720718fbda1194f925e0a9d931bc220e8b0e3a.tar.bz2
llvm-4b720718fbda1194f925e0a9d931bc220e8b0e3a.tar.xz
Reenable the transform "(X*Y)/Y->X" when the multiplication is known not to
overflow (nsw flag), which was disabled because it breaks 254.gap. I have informed the GAP authors of the mistake in their code, and arranged for the testsuite to use -fwrapv when compiling this benchmark. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124746 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Transforms/InstSimplify')
-rw-r--r--test/Transforms/InstSimplify/2010-12-20-Reassociate.ll4
1 files changed, 4 insertions, 0 deletions
diff --git a/test/Transforms/InstSimplify/2010-12-20-Reassociate.ll b/test/Transforms/InstSimplify/2010-12-20-Reassociate.ll
index c0ae257dcd..928442ac56 100644
--- a/test/Transforms/InstSimplify/2010-12-20-Reassociate.ll
+++ b/test/Transforms/InstSimplify/2010-12-20-Reassociate.ll
@@ -92,10 +92,12 @@ define i32 @sub3(i32 %x, i32 %y) {
}
define i32 @sdiv1(i32 %x, i32 %y) {
+; CHECK: @sdiv1
; (no overflow X * Y) / Y -> X
%mul = mul nsw i32 %x, %y
%r = sdiv i32 %mul, %y
ret i32 %r
+; CHECK: ret i32 %x
}
define i32 @sdiv2(i32 %x, i32 %y) {
@@ -136,10 +138,12 @@ define i32 @sdiv5(i32 %x, i32 %y) {
}
define i32 @udiv1(i32 %x, i32 %y) {
+; CHECK: @udiv1
; (no overflow X * Y) / Y -> X
%mul = mul nuw i32 %x, %y
%r = udiv i32 %mul, %y
ret i32 %r
+; CHECK: ret i32 %x
}
define i32 @udiv2(i32 %x, i32 %y) {