Corruptly merge constants with explicit and implicit alignments.
[oota-llvm.git] / test / Transforms / LoopSimplify / indirectbr.ll
index b0238473b681d2bc8dcee7837079387f85d207b0..ca05f437e5cfc82dcc797c110b9243e6b2c7384d 100644 (file)
@@ -1,5 +1,5 @@
-; RUN: opt < %s -loopsimplify -lcssa -verify-loop-info -verify-dom-info -S \
-; RUN:   | grep -F {indirectbr i8* %x, \[label %L0, label %L1\]} \
+; RUN: opt < %s -loop-simplify -lcssa -verify-loop-info -verify-dom-info -S \
+; RUN:   | grep -F "indirectbr i8* %x, [label %L0, label %L1]" \
 ; RUN:   | count 6
 
 ; LoopSimplify should not try to transform loops when indirectbr is involved.
@@ -81,3 +81,20 @@ L1:
   %y = phi i64 [ %z, %L0 ], [ 1, %entry ]
   ret i64 %y
 }
+
+define void @pr5502() nounwind {
+entry:
+  br label %while.cond
+
+while.cond:
+  br i1 undef, label %while.body, label %while.end
+
+while.body:
+  indirectbr i8* undef, [label %end_opcode, label %end_opcode]
+
+end_opcode:
+  br i1 false, label %end_opcode, label %while.cond
+
+while.end:
+  ret void
+}