mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-09-27 15:57:13 +00:00
Do not delete dead invoke instructions!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17897 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
e5525438b0
commit
73559b1f4c
@ -875,7 +875,7 @@ bool SCCP::runOnFunction(Function &F) {
|
|||||||
Instruction *Inst = BI++;
|
Instruction *Inst = BI++;
|
||||||
if (Inst->getType() != Type::VoidTy) {
|
if (Inst->getType() != Type::VoidTy) {
|
||||||
LatticeVal &IV = Values[Inst];
|
LatticeVal &IV = Values[Inst];
|
||||||
if (IV.isConstant() || IV.isUndefined()) {
|
if (IV.isConstant() || IV.isUndefined() && !isa<TerminatorInst>(Inst)) {
|
||||||
Constant *Const;
|
Constant *Const;
|
||||||
if (IV.isConstant()) {
|
if (IV.isConstant()) {
|
||||||
Const = IV.getConstant();
|
Const = IV.getConstant();
|
||||||
@ -900,4 +900,3 @@ bool SCCP::runOnFunction(Function &F) {
|
|||||||
|
|
||||||
return MadeChanges;
|
return MadeChanges;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user