Skip to content

Commit b085d4b

Browse files
committed
Addressing Review Comments
1 parent e90bc02 commit b085d4b

File tree

1 file changed

+10
-6
lines changed

1 file changed

+10
-6
lines changed

llvm/lib/Target/AMDGPU/SIISelLowering.cpp

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5339,18 +5339,22 @@ static MachineBasicBlock *lowerWaveReduce(MachineInstr &MI,
53395339
if (isSGPR) {
53405340
switch (Opc) {
53415341
case AMDGPU::S_MIN_U32:
5342-
case AMDGPU::V_CMP_LT_U64_e64: /*umin*/
53435342
case AMDGPU::S_MIN_I32:
5344-
case AMDGPU::V_CMP_LT_I64_e64: /*min*/
53455343
case AMDGPU::S_MAX_U32:
5346-
case AMDGPU::V_CMP_GT_U64_e64: /*umax*/
53475344
case AMDGPU::S_MAX_I32:
5348-
case AMDGPU::V_CMP_GT_I64_e64: /*max*/
53495345
case AMDGPU::S_AND_B32:
53505346
case AMDGPU::S_OR_B32: {
53515347
// Idempotent operations.
5352-
unsigned movOpc = is32BitOpc ? AMDGPU::S_MOV_B32 : AMDGPU::S_MOV_B64;
5353-
BuildMI(BB, MI, DL, TII->get(movOpc), DstReg).addReg(SrcReg);
5348+
BuildMI(BB, MI, DL, TII->get(AMDGPU::S_MOV_B32), DstReg).addReg(SrcReg);
5349+
RetBB = &BB;
5350+
break;
5351+
}
5352+
case AMDGPU::V_CMP_LT_U64_e64: // umin
5353+
case AMDGPU::V_CMP_LT_I64_e64: // min
5354+
case AMDGPU::V_CMP_GT_U64_e64: // umax
5355+
case AMDGPU::V_CMP_GT_I64_e64: { // max
5356+
// Idempotent operations.
5357+
BuildMI(BB, MI, DL, TII->get(AMDGPU::S_MOV_B64), DstReg).addReg(SrcReg);
53545358
RetBB = &BB;
53555359
break;
53565360
}

0 commit comments

Comments
 (0)