summaryrefslogtreecommitdiffstats
path: root/llvm/test/Transforms/Reassociate/fp-commute.ll
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
commit763da45e9efd17da0c94982aca70d32e1b862251 (patch)
tree28f3eebdf68dbc0eb42d96e8f8d902bb36bf7f3f /llvm/test/Transforms/Reassociate/fp-commute.ll
parent53b74ac25697fb03569ffe98e309be377899ba92 (diff)
downloadbcm5719-llvm-763da45e9efd17da0c94982aca70d32e1b862251.tar.gz
bcm5719-llvm-763da45e9efd17da0c94982aca70d32e1b862251.zip
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. llvm-svn: 158073
Diffstat (limited to 'llvm/test/Transforms/Reassociate/fp-commute.ll')
-rw-r--r--llvm/test/Transforms/Reassociate/fp-commute.ll10
1 files changed, 6 insertions, 4 deletions
diff --git a/llvm/test/Transforms/Reassociate/fp-commute.ll b/llvm/test/Transforms/Reassociate/fp-commute.ll
index 5644f7ca701..025689bb0c1 100644
--- a/llvm/test/Transforms/Reassociate/fp-commute.ll
+++ b/llvm/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
}
-
-
OpenPOWER on IntegriCloud