mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-08-19 04:29:21 +00:00
Bug fix. Only safe to perform extension uses optimization if the source of extension is also defined in the same BB as the extension.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44896 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
3a3f163ba6
commit
772de516b6
@ -929,6 +929,11 @@ bool CodeGenPrepare::OptimizeExtUses(Instruction *I) {
|
|||||||
if (Src->hasOneUse())
|
if (Src->hasOneUse())
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
|
// Only safe to perform the optimization if the source is also defined in
|
||||||
|
// this block.
|
||||||
|
if (DefBB != cast<Instruction>(Src)->getParent())
|
||||||
|
return false;
|
||||||
|
|
||||||
bool DefIsLiveOut = false;
|
bool DefIsLiveOut = false;
|
||||||
for (Value::use_iterator UI = I->use_begin(), E = I->use_end();
|
for (Value::use_iterator UI = I->use_begin(), E = I->use_end();
|
||||||
UI != E; ++UI) {
|
UI != E; ++UI) {
|
||||||
|
Loading…
Reference in New Issue
Block a user