mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-28 06:32:09 +00:00
Fix an ugly problem in SCCP. This fixes Benchmarks/Misc-C++/mandel-text.cpp
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31073 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
87d8429506
commit
6734bffe24
@ -1032,7 +1032,7 @@ bool SCCPSolver::ResolveBranchesIn(Function &F) {
|
||||
if (BI->isConditional()) {
|
||||
LatticeVal &BCValue = getValueState(BI->getCondition());
|
||||
if (BCValue.isUndefined()) {
|
||||
BI->setCondition(ConstantBool::getTrue());
|
||||
BCValue.markOverdefined();
|
||||
BranchesResolved = true;
|
||||
visit(BI);
|
||||
}
|
||||
@ -1041,7 +1041,8 @@ bool SCCPSolver::ResolveBranchesIn(Function &F) {
|
||||
LatticeVal &SCValue = getValueState(SI->getCondition());
|
||||
if (SCValue.isUndefined()) {
|
||||
const Type *CondTy = SI->getCondition()->getType();
|
||||
SI->setCondition(Constant::getNullValue(CondTy));
|
||||
// Pick and arbitrary direction for the switch to go.
|
||||
SCValue.markOverdefined();
|
||||
BranchesResolved = true;
|
||||
visit(SI);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user