summaryrefslogtreecommitdiffstats
path: root/llvm/test/Transforms/Reassociate/fp-expr.ll
diff options
context:
space:
mode:
authorOwen Anderson <resistor@mac.com>2015-11-20 08:16:13 +0000
committerOwen Anderson <resistor@mac.com>2015-11-20 08:16:13 +0000
commit630077ef558317ac85bfc266737040eaecd0bcb0 (patch)
treede32cd0ae4432959e87b9a995d5647df30ac4dad /llvm/test/Transforms/Reassociate/fp-expr.ll
parent7d0cc2378655423462e33aebb7f7cd13588734a9 (diff)
downloadbcm5719-llvm-630077ef558317ac85bfc266737040eaecd0bcb0.tar.gz
bcm5719-llvm-630077ef558317ac85bfc266737040eaecd0bcb0.zip
Fix a pair of issues that caused an infinite loop in reassociate.
Terrifyingly, one of them is a mishandling of floating point vectors in Constant::isZero(). How exactly this issue survived this long is beyond me. llvm-svn: 253655
Diffstat (limited to 'llvm/test/Transforms/Reassociate/fp-expr.ll')
-rw-r--r--llvm/test/Transforms/Reassociate/fp-expr.ll20
1 files changed, 20 insertions, 0 deletions
diff --git a/llvm/test/Transforms/Reassociate/fp-expr.ll b/llvm/test/Transforms/Reassociate/fp-expr.ll
new file mode 100644
index 00000000000..ee927069812
--- /dev/null
+++ b/llvm/test/Transforms/Reassociate/fp-expr.ll
@@ -0,0 +1,20 @@
+; RUN: opt -S -reassociate < %s | FileCheck %s
+
+define void @test1() {
+; CHECK-LABEL: @test1
+; CHECK: call
+; CHECK: fsub
+; CHECK: fadd
+ %tmp = tail call <4 x float> @blam()
+ %tmp23 = fsub fast <4 x float> undef, %tmp
+ %tmp24 = fadd fast <4 x float> %tmp23, undef
+ tail call void @wombat(<4 x float> %tmp24)
+ ret void
+}
+
+; Function Attrs: optsize
+declare <4 x float> @blam()
+
+; Function Attrs: optsize
+declare void @wombat(<4 x float>)
+
OpenPOWER on IntegriCloud