forked from OSchip/llvm-project
[X86] Don't add stores to the autogenerated load folding tables if the register and memory operands have different widths.
This can cause the amount of the memory written to be changed which would be bad. llvm-svn: 334480
This commit is contained in:
parent
5799e4df75
commit
4cdb153dde
|
@ -562,7 +562,8 @@ void X86FoldTablesEmitter::updateTables(const CodeGenInstruction *RegInstr,
|
|||
// MOVAPSmr => (outs), (ins f128mem:$dst, VR128:$src)
|
||||
Record *RegOpRec = RegInstr->Operands[RegOutSize - 1].Rec;
|
||||
Record *MemOpRec = MemInstr->Operands[RegOutSize - 1].Rec;
|
||||
if (isRegisterOperand(RegOpRec) && isMemoryOperand(MemOpRec))
|
||||
if (isRegisterOperand(RegOpRec) && isMemoryOperand(MemOpRec) &&
|
||||
getRegOperandSize(RegOpRec) == getMemOperandSize(MemOpRec))
|
||||
addEntryWithFlags(Table0, RegInstr, MemInstr, S, 0);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue