summaryrefslogtreecommitdiffstats
path: root/llvm/test
diff options
context:
space:
mode:
authorBenjamin Kramer <benny.kra@googlemail.com>2011-05-21 18:31:42 +0000
committerBenjamin Kramer <benny.kra@googlemail.com>2011-05-21 18:31:42 +0000
commitfda5dc4968e6a4a7e17c8a68b18f6a2cb735b69f (patch)
treeb6d6e7139f4c31fc5498103429fa99900d38b40f /llvm/test
parent097984480d5782367b61e4000324e507a7d95d64 (diff)
downloadbcm5719-llvm-fda5dc4968e6a4a7e17c8a68b18f6a2cb735b69f.tar.gz
bcm5719-llvm-fda5dc4968e6a4a7e17c8a68b18f6a2cb735b69f.zip
Revert "InstCombine: Turn mul.with.overflow(X, 2) into the cheaper add.with.overflow(X, X)"
It's better to do this in codegen, mul.with.overflow(X, 2) is more canonical because it has only one use on "X". llvm-svn: 131798
Diffstat (limited to 'llvm/test')
-rw-r--r--llvm/test/Transforms/InstCombine/intrinsics.ll21
1 files changed, 0 insertions, 21 deletions
diff --git a/llvm/test/Transforms/InstCombine/intrinsics.ll b/llvm/test/Transforms/InstCombine/intrinsics.ll
index 3a0b312a2a2..107f313b019 100644
--- a/llvm/test/Transforms/InstCombine/intrinsics.ll
+++ b/llvm/test/Transforms/InstCombine/intrinsics.ll
@@ -114,7 +114,6 @@ define i8 @umultest2(i8 %A, i1* %overflowPtr) {
%ov.result.32 = type { i32, i1 }
declare %ov.result.32 @llvm.umul.with.overflow.i32(i32, i32) nounwind readnone
-declare %ov.result.32 @llvm.smul.with.overflow.i32(i32, i32) nounwind readnone
define i32 @umultest3(i32 %n) nounwind {
%shr = lshr i32 %n, 2
@@ -140,26 +139,6 @@ define i32 @umultest4(i32 %n) nounwind {
; CHECK: umul.with.overflow
}
-define i32 @umultest5(i32 %n) nounwind {
- %mul = call %ov.result.32 @llvm.umul.with.overflow.i32(i32 %n, i32 2)
- %ov = extractvalue %ov.result.32 %mul, 1
- %res = extractvalue %ov.result.32 %mul, 0
- %ret = select i1 %ov, i32 -1, i32 %res
- ret i32 %ret
-; CHECK: @umultest5
-; CHECK: llvm.uadd.with.overflow.i32(i32 %n, i32 %n)
-}
-
-define i32 @smultest1(i32 %n) nounwind {
- %mul = call %ov.result.32 @llvm.smul.with.overflow.i32(i32 %n, i32 2)
- %ov = extractvalue %ov.result.32 %mul, 1
- %res = extractvalue %ov.result.32 %mul, 0
- %ret = select i1 %ov, i32 -1, i32 %res
- ret i32 %ret
-; CHECK: @smultest1
-; CHECK: llvm.sadd.with.overflow.i32(i32 %n, i32 %n)
-}
-
define void @powi(double %V, double *%P) {
entry:
%A = tail call double @llvm.powi.f64(double %V, i32 -1) nounwind
OpenPOWER on IntegriCloud