mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-11-02 07:17:36 +00:00
R600/SI: Fix asam errors in SIFoldOperands
We were trying to fold into implicit uses, which led to out of bounds access of the MCInstrDesc::OpInfo arrray. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229533 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -203,7 +203,8 @@ bool SIFoldOperands::runOnMachineFunction(MachineFunction &MF) {
|
||||
const MachineOperand &UseOp = UseMI->getOperand(Use.getOperandNo());
|
||||
|
||||
// FIXME: Fold operands with subregs.
|
||||
if (UseOp.isReg() && UseOp.getSubReg() && OpToFold.isReg()) {
|
||||
if (UseOp.isReg() && ((UseOp.getSubReg() && OpToFold.isReg()) ||
|
||||
UseOp.isImplicit())) {
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user