From 630077ef558317ac85bfc266737040eaecd0bcb0 Mon Sep 17 00:00:00 2001 From: Owen Anderson Date: Fri, 20 Nov 2015 08:16:13 +0000 Subject: 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 --- llvm/test/Transforms/Reassociate/fp-expr.ll | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 llvm/test/Transforms/Reassociate/fp-expr.ll (limited to 'llvm/test/Transforms/Reassociate') 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>) + -- cgit v1.2.3