mirror of
https://github.com/RPCS3/llvm.git
synced 2025-01-22 10:16:43 +00:00
[RegisterBankInfo] Do not provide a default mapping for non-reg of phi
operations. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@266027 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
73ec6f759b
commit
edae2f105b
@ -309,10 +309,17 @@ RegisterBankInfo::getInstrMappingImpl(const MachineInstr &MI) const {
|
||||
// Propagate RegBank to all operands that do not have a
|
||||
// mapping yet.
|
||||
for (unsigned OpIdx = 0, End = MI.getNumOperands(); OpIdx != End; ++OpIdx) {
|
||||
const MachineOperand &MO = MI.getOperand(OpIdx);
|
||||
// Don't assign a mapping for non-reg operands.
|
||||
if (!MO.isReg())
|
||||
continue;
|
||||
|
||||
// If a mapping already exists, do not touch it.
|
||||
if (!static_cast<const InstructionMapping *>(&Mapping)
|
||||
->getOperandMapping(OpIdx)
|
||||
.BreakDown.empty())
|
||||
continue;
|
||||
|
||||
Mapping.setOperandMapping(OpIdx, RegSize, *RegBank);
|
||||
}
|
||||
return Mapping;
|
||||
|
Loading…
x
Reference in New Issue
Block a user