mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-09-24 23:28:41 +00:00
R600/SI: Fix incorrect encoding of DS_WRITE_B32 instructions
The SIInsertWaits pass was overwriting the first operand (gds bit) of DS_WRITE_B32 with the second operand (value to write). This meant that any time the value to write was stored in an odd number VGPR, the gds bit would be set causing the instruction to write to GDS instead of LDS. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@188522 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -134,9 +134,7 @@ Counters SIInsertWaits::getHwCounts(MachineInstr &MI) {
|
||||
// LGKM may uses larger values
|
||||
if (TSFlags & SIInstrFlags::LGKM_CNT) {
|
||||
|
||||
MachineOperand &Op = MI.getOperand(0);
|
||||
if (!Op.isReg())
|
||||
Op = MI.getOperand(1);
|
||||
const MachineOperand &Op = MI.getOperand(0);
|
||||
assert(Op.isReg() && "First LGKM operand must be a register!");
|
||||
|
||||
unsigned Reg = Op.getReg();
|
||||
|
Reference in New Issue
Block a user