summaryrefslogtreecommitdiff
path: root/test/Transforms/Reassociate
diff options
context:
space:
mode:
authorDuncan Sands <baldrick@free.fr>2012-11-18 19:27:01 +0000
committerDuncan Sands <baldrick@free.fr>2012-11-18 19:27:01 +0000
commitb8e1111fbf71766903d2fc7b158dc612df097ea3 (patch)
tree67744ef41c524f66a1ae87abf7f950ea6d344c29 /test/Transforms/Reassociate
parent085f6a4ac201851b0c8edfce9847c5b236181f06 (diff)
downloadllvm-b8e1111fbf71766903d2fc7b158dc612df097ea3.tar.gz
llvm-b8e1111fbf71766903d2fc7b158dc612df097ea3.tar.bz2
llvm-b8e1111fbf71766903d2fc7b158dc612df097ea3.tar.xz
Fix PR14060, an infinite loop in reassociate. The problem was that one of the
operands of the expression being written was wrongly thought to be reusable as an inner node of the expression resulting in it turning up as both an inner node *and* a leaf, creating a cycle in the def-use graph. This would have caused the verifier to blow up if things had gotten that far, however it managed to provoke an infinite loop first. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168291 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Transforms/Reassociate')
-rw-r--r--test/Transforms/Reassociate/crash.ll19
1 files changed, 19 insertions, 0 deletions
diff --git a/test/Transforms/Reassociate/crash.ll b/test/Transforms/Reassociate/crash.ll
index a617e9f327..e29b5dc9c0 100644
--- a/test/Transforms/Reassociate/crash.ll
+++ b/test/Transforms/Reassociate/crash.ll
@@ -153,3 +153,22 @@ define i32 @bar(i32 %arg, i32 %arg1, i32 %arg2) {
%ret = add i32 %tmp2, %tmp3
ret i32 %ret
}
+
+; PR14060
+define i8 @hang(i8 %p, i8 %p0, i8 %p1, i8 %p2, i8 %p3, i8 %p4, i8 %p5, i8 %p6, i8 %p7, i8 %p8, i8 %p9) {
+ %tmp = zext i1 false to i8
+ %tmp16 = or i8 %tmp, 1
+ %tmp22 = or i8 %p7, %p0
+ %tmp23 = or i8 %tmp16, %tmp22
+ %tmp28 = or i8 %p9, %p1
+ %tmp31 = or i8 %tmp23, %p2
+ %tmp32 = or i8 %tmp31, %tmp28
+ %tmp38 = or i8 %p8, %p3
+ %tmp39 = or i8 %tmp16, %tmp38
+ %tmp43 = or i8 %tmp39, %p4
+ %tmp44 = or i8 %tmp43, 1
+ %tmp47 = or i8 %tmp32, %p5
+ %tmp50 = or i8 %tmp47, %p6
+ %tmp51 = or i8 %tmp44, %tmp50
+ ret i8 %tmp51
+}