forked from OSchip/llvm-project
cd53b7f54e
Summary: Before removing basic blocks that ipsccp has considered as dead all uses of the basic block label must be removed. That is done by calling ConstantFoldTerminator on the users. An exception is when the branch condition is an undef value. In such scenarios ipsccp is using some internal assumptions regarding which edge in the control flow that should remain, while ConstantFoldTerminator don't know how to fold the terminator. The problem addressed here is related to ConstantFoldTerminator's ability to rewrite a 'switch' into a conditional 'br'. In such situations ConstantFoldTerminator returns true indicating that the terminator has been rewritten. However, ipsccp treated the true value as if the edge to the dead basic block had been removed. So the code for resolving an undef branch condition did not trigger, and we ended up with assertion that there were uses remaining when deleting the basic block. The solution is to resolve indeterminate branches before the call to ConstantFoldTerminator. Reviewers: efriedma, fhahn, davide Reviewed By: fhahn Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D52232 llvm-svn: 342632 |
||
---|---|---|
.. | ||
2002-05-02-MissSecondInst.ll | ||
2002-05-20-MissedIncomingValue.ll | ||
2002-05-21-InvalidSimplify.ll | ||
2002-08-30-GetElementPtrTest.ll | ||
2003-06-24-OverdefinedPHIValue.ll | ||
2003-08-26-InvokeHandling.ll | ||
2004-11-16-DeadInvoke.ll | ||
2004-12-10-UndefBranchBug.ll | ||
2006-10-23-IPSCCP-Crash.ll | ||
2006-12-04-PackedType.ll | ||
2006-12-19-UndefBug.ll | ||
2007-05-16-InvokeCrash.ll | ||
2008-01-27-UndefCorrelate.ll | ||
2008-04-22-multiple-ret-sccp.ll | ||
2008-05-23-UndefCallFold.ll | ||
2009-01-14-IPSCCP-Invoke.ll | ||
2009-05-27-VectorOperandZero.ll | ||
apint-array.ll | ||
apint-basictest.ll | ||
apint-basictest2.ll | ||
apint-basictest3.ll | ||
apint-basictest4.ll | ||
apint-bigarray.ll | ||
apint-bigint.ll | ||
apint-bigint2.ll | ||
apint-ipsccp1.ll | ||
apint-ipsccp2.ll | ||
apint-ipsccp3.ll | ||
apint-ipsccp4.ll | ||
apint-load.ll | ||
apint-phi.ll | ||
apint-select.ll | ||
atomic-load-store.ll | ||
atomic.ll | ||
bitcast.ll | ||
calltest.ll | ||
comdat-ipo.ll | ||
constant-struct.ll | ||
crash.ll | ||
definite-initializer.ll | ||
dont-zap-return.ll | ||
global-alias-constprop.ll | ||
indirectbr.ll | ||
ip-constant-ranges.ll | ||
ipsccp-addr-taken.ll | ||
ipsccp-basic.ll | ||
ipsccp-branch-unresolved-undef.ll | ||
ipsccp-phi-one-pred-dead.ll | ||
loadtest.ll | ||
logical-nuke.ll | ||
overdefined-div.ll | ||
pr27712.ll | ||
pr35357.ll | ||
preserve-analysis.ll | ||
return-zapped.ll | ||
retvalue-undef.ll | ||
sccptest.ll | ||
select.ll | ||
switch-multiple-undef.ll | ||
switch-undef-constantfoldterminator.ll | ||
switch.ll | ||
ub-shift.ll | ||
undef-resolve.ll | ||
vector-bitcast.ll |