mirror of
https://github.com/RPCS3/llvm.git
synced 2025-02-19 10:15:00 +00:00
Don't replace multiple result of calls with undef,
sccp tracks getresult values, not call values in this case. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50202 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
f4023a1ef6
commit
7cb22ecf22
@ -1516,7 +1516,8 @@ bool SCCP::runOnFunction(Function &F) {
|
||||
//
|
||||
for (BasicBlock::iterator BI = BB->begin(), E = BB->end(); BI != E; ) {
|
||||
Instruction *Inst = BI++;
|
||||
if (Inst->getType() == Type::VoidTy ||
|
||||
if (Inst->getType() == Type::VoidTy ||
|
||||
isa<StructType>(Inst->getType()) ||
|
||||
isa<TerminatorInst>(Inst))
|
||||
continue;
|
||||
|
||||
@ -1692,7 +1693,8 @@ bool IPSCCP::runOnModule(Module &M) {
|
||||
} else {
|
||||
for (BasicBlock::iterator BI = BB->begin(), E = BB->end(); BI != E; ) {
|
||||
Instruction *Inst = BI++;
|
||||
if (Inst->getType() != Type::VoidTy) {
|
||||
if (Inst->getType() != Type::VoidTy &&
|
||||
!isa<StructType>(Inst->getType())) {
|
||||
LatticeVal &IV = Values[Inst];
|
||||
if (IV.isConstant() ||
|
||||
(IV.isUndefined() && !isa<TerminatorInst>(Inst))) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user