diff options
Diffstat (limited to 'llvm/lib/Target/AMDGPU/SIShrinkInstructions.cpp')
-rw-r--r-- | llvm/lib/Target/AMDGPU/SIShrinkInstructions.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/llvm/lib/Target/AMDGPU/SIShrinkInstructions.cpp b/llvm/lib/Target/AMDGPU/SIShrinkInstructions.cpp index 8afca2cdc32..3986ca6dfa8 100644 --- a/llvm/lib/Target/AMDGPU/SIShrinkInstructions.cpp +++ b/llvm/lib/Target/AMDGPU/SIShrinkInstructions.cpp @@ -603,8 +603,10 @@ bool SIShrinkInstructions::runOnMachineFunction(MachineFunction &MF) { // => // s_nop (N + M) if (MI.getOpcode() == AMDGPU::S_NOP && + MI.getNumOperands() == 1 && // Don't merge with implicit operands Next != MBB.end() && - (*Next).getOpcode() == AMDGPU::S_NOP) { + (*Next).getOpcode() == AMDGPU::S_NOP && + (*Next).getNumOperands() == 1) { MachineInstr &NextMI = *Next; // The instruction encodes the amount to wait with an offset of 1, |