mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-01-31 20:51:52 +01:00
When the definition of an address value is in a different block
from the user of the address, fall back to just using the address in a register instead of bailing out of fast-isel altogether. llvm-svn: 118917
This commit is contained in:
parent
2a70c4e38a
commit
8b86287a06
@ -320,11 +320,11 @@ bool X86FastISel::X86SelectAddress(const Value *V, X86AddressMode &AM) {
|
|||||||
// Don't walk into other basic blocks; it's possible we haven't
|
// Don't walk into other basic blocks; it's possible we haven't
|
||||||
// visited them yet, so the instructions may not yet be assigned
|
// visited them yet, so the instructions may not yet be assigned
|
||||||
// virtual registers.
|
// virtual registers.
|
||||||
if (FuncInfo.MBBMap[I->getParent()] != FuncInfo.MBB)
|
if (FuncInfo.StaticAllocaMap.count(static_cast<const AllocaInst *>(V)) ||
|
||||||
return false;
|
FuncInfo.MBBMap[I->getParent()] == FuncInfo.MBB) {
|
||||||
|
Opcode = I->getOpcode();
|
||||||
Opcode = I->getOpcode();
|
U = I;
|
||||||
U = I;
|
}
|
||||||
} else if (const ConstantExpr *C = dyn_cast<ConstantExpr>(V)) {
|
} else if (const ConstantExpr *C = dyn_cast<ConstantExpr>(V)) {
|
||||||
Opcode = C->getOpcode();
|
Opcode = C->getOpcode();
|
||||||
U = C;
|
U = C;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user