summaryrefslogtreecommitdiffstats
path: root/llvm/test/CodeGen/X86/phi-bit-propagation.ll
diff options
context:
space:
mode:
authorCameron Zwarich <zwarich@apple.com>2011-02-27 08:06:01 +0000
committerCameron Zwarich <zwarich@apple.com>2011-02-27 08:06:01 +0000
commit68f677a61286154f4d389123498843b2f82e903f (patch)
tree73e33cab1c8cac338092c8d84661281d9a97d6ff /llvm/test/CodeGen/X86/phi-bit-propagation.ll
parentbaeb5f14310f5b4b8bc139b9c3a2a5495ffae4ef (diff)
downloadbcm5719-llvm-68f677a61286154f4d389123498843b2f82e903f.tar.gz
bcm5719-llvm-68f677a61286154f4d389123498843b2f82e903f.zip
Fix PR9324 / <rdar://problem/9052489> by handling the case where a PHI has no uses.
llvm-svn: 126567
Diffstat (limited to 'llvm/test/CodeGen/X86/phi-bit-propagation.ll')
-rw-r--r--llvm/test/CodeGen/X86/phi-bit-propagation.ll20
1 files changed, 20 insertions, 0 deletions
diff --git a/llvm/test/CodeGen/X86/phi-bit-propagation.ll b/llvm/test/CodeGen/X86/phi-bit-propagation.ll
index da9652f7340..94c97229b09 100644
--- a/llvm/test/CodeGen/X86/phi-bit-propagation.ll
+++ b/llvm/test/CodeGen/X86/phi-bit-propagation.ll
@@ -33,3 +33,23 @@ return: ; preds = %for.body, %for.cond
%retval.0 = phi i1 [ true, %for.body ], [ false, %for.cond ]
ret i1 %retval.0
}
+
+; This test case caused an assertion failure; see PR9324.
+define void @func_37() noreturn nounwind ssp {
+entry:
+ br i1 undef, label %lbl_919, label %entry.for.inc_crit_edge
+
+entry.for.inc_crit_edge: ; preds = %entry
+ br label %for.inc
+
+lbl_919: ; preds = %for.cond7.preheader, %entry
+ br label %for.cond7.preheader
+
+for.cond7.preheader: ; preds = %for.inc, %lbl_919
+ %storemerge.ph = phi i8 [ 0, %lbl_919 ], [ %add, %for.inc ]
+ br i1 undef, label %for.inc, label %lbl_919
+
+for.inc: ; preds = %for.cond7.preheader, %entry.for.inc_crit_edge
+ %add = add i8 undef, 1
+ br label %for.cond7.preheader
+}
OpenPOWER on IntegriCloud