mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-26 23:24:34 +00:00
Revert "Teach the load analysis to allow finding available values which require" (r220277)
This seems to have caused PR21330. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220349 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -902,8 +902,8 @@ bool JumpThreading::SimplifyPartiallyRedundantLoad(LoadInst *LI) {
|
||||
// only happen in dead loops.
|
||||
if (AvailableVal == LI) AvailableVal = UndefValue::get(LI->getType());
|
||||
if (AvailableVal->getType() != LI->getType())
|
||||
AvailableVal =
|
||||
CastInst::CreateBitOrPointerCast(AvailableVal, LI->getType(), "", LI);
|
||||
AvailableVal = CastInst::Create(CastInst::BitCast, AvailableVal,
|
||||
LI->getType(), "", LI);
|
||||
LI->replaceAllUsesWith(AvailableVal);
|
||||
LI->eraseFromParent();
|
||||
return true;
|
||||
@ -1040,8 +1040,8 @@ bool JumpThreading::SimplifyPartiallyRedundantLoad(LoadInst *LI) {
|
||||
// predecessor use the same bitcast.
|
||||
Value *&PredV = I->second;
|
||||
if (PredV->getType() != LI->getType())
|
||||
PredV = CastInst::CreateBitOrPointerCast(PredV, LI->getType(), "",
|
||||
P->getTerminator());
|
||||
PredV = CastInst::Create(CastInst::BitCast, PredV, LI->getType(), "",
|
||||
P->getTerminator());
|
||||
|
||||
PN->addIncoming(PredV, I->first);
|
||||
}
|
||||
|
Reference in New Issue
Block a user