We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5c4bf5e commit 547f000Copy full SHA for 547f000
llvm/lib/Target/AMDGPU/AMDGPUPrepareAGPRAlloc.cpp
@@ -94,12 +94,12 @@ bool AMDGPUPrepareAGPRAllocImpl::run(MachineFunction &MF) {
94
bool Changed = false;
95
for (MachineBasicBlock &MBB : MF) {
96
for (MachineInstr &MI : MBB) {
97
- if (MI.getOpcode() == AMDGPU::V_MOV_B32_e32 ||
98
- MI.getOpcode() == AMDGPU::V_ACCVGPR_WRITE_B32_e64) {
99
- if (TII.isInlineConstant(MI, 1)) {
100
- MI.setDesc(AVImmPseudo);
101
- Changed = true;
102
- }
+ if ((MI.getOpcode() == AMDGPU::V_MOV_B32_e32 &&
+ TII.isInlineConstant(MI, 1)) ||
+ (MI.getOpcode() == AMDGPU::V_ACCVGPR_WRITE_B32_e64 &&
+ MI.getOperand(1).isImm())) {
+ MI.setDesc(AVImmPseudo);
+ Changed = true;
103
}
104
105
0 commit comments