aboutsummaryrefslogtreecommitdiffstats
path: root/test/Transforms/Reassociate
diff options
context:
space:
mode:
authorDuncan Sands <baldrick@free.fr>2012-06-06 14:53:10 +0000
committerDuncan Sands <baldrick@free.fr>2012-06-06 14:53:10 +0000
commitb933586592afa9596edd466e127401bffeba3d4a (patch)
tree0aaa4adce3194aa52fe460d2e2a6d407abb667fd /test/Transforms/Reassociate
parentd14e4e133f940d0c1f454a40f3bd835a8c7a7886 (diff)
downloadexternal_llvm-b933586592afa9596edd466e127401bffeba3d4a.zip
external_llvm-b933586592afa9596edd466e127401bffeba3d4a.tar.gz
external_llvm-b933586592afa9596edd466e127401bffeba3d4a.tar.bz2
Grab-bag of reassociate tweaks. Unify handling of dead instructions and
instructions to reoptimize. Exploit this to more systematically eliminate dead instructions (this isn't very useful in practice but is convenient for analysing some testcase I am working on). No need for WeakVH any more: use an AssertingVH instead. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@158073 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Transforms/Reassociate')
-rw-r--r--test/Transforms/Reassociate/fp-commute.ll10
1 files changed, 6 insertions, 4 deletions
diff --git a/test/Transforms/Reassociate/fp-commute.ll b/test/Transforms/Reassociate/fp-commute.ll
index 5644f7c..025689b 100644
--- a/test/Transforms/Reassociate/fp-commute.ll
+++ b/test/Transforms/Reassociate/fp-commute.ll
@@ -2,15 +2,17 @@
target triple = "armv7-apple-ios"
+declare void @use(float)
+
; CHECK: test
-define float @test(float %x, float %y) {
+define void @test(float %x, float %y) {
entry:
; CHECK: fmul float %x, %y
; CHECK: fmul float %x, %y
%0 = fmul float %x, %y
%1 = fmul float %y, %x
%2 = fsub float %0, %1
- ret float %1
+ call void @use(float %0)
+ call void @use(float %2)
+ ret void
}
-
-