From eee444cc4e248ae426cddfcb267eec8fb0fbf691 Mon Sep 17 00:00:00 2001 From: Cameron Zwarich Date: Sun, 27 Feb 2011 08:06:01 +0000 Subject: Fix PR9324 / by handling the case where a PHI has no uses. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@126567 91177308-0d34-0410-b5e6-96231b3b80d8 --- test/CodeGen/X86/phi-bit-propagation.ll | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'test/CodeGen/X86/phi-bit-propagation.ll') diff --git a/test/CodeGen/X86/phi-bit-propagation.ll b/test/CodeGen/X86/phi-bit-propagation.ll index da9652f..94c9722 100644 --- a/test/CodeGen/X86/phi-bit-propagation.ll +++ b/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 +} -- cgit v1.1