mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-02-01 13:11:39 +01:00
Do not delete dead invoke instructions!
llvm-svn: 17897
This commit is contained in:
parent
3885f4ec6d
commit
92e712b00f
@ -875,7 +875,7 @@ bool SCCP::runOnFunction(Function &F) {
|
||||
Instruction *Inst = BI++;
|
||||
if (Inst->getType() != Type::VoidTy) {
|
||||
LatticeVal &IV = Values[Inst];
|
||||
if (IV.isConstant() || IV.isUndefined()) {
|
||||
if (IV.isConstant() || IV.isUndefined() && !isa<TerminatorInst>(Inst)) {
|
||||
Constant *Const;
|
||||
if (IV.isConstant()) {
|
||||
Const = IV.getConstant();
|
||||
@ -900,4 +900,3 @@ bool SCCP::runOnFunction(Function &F) {
|
||||
|
||||
return MadeChanges;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user