Skip to content

Commit 810b942

Browse files
committed
Address Review Comments
1 parent 8892ab5 commit 810b942

File tree

2 files changed

+9
-7
lines changed

2 files changed

+9
-7
lines changed

llvm/include/llvm/IR/IntrinsicsAMDGPU.td

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2342,14 +2342,16 @@ class AMDGPUWaveReduce<LLVMType data_ty = llvm_anyint_ty> : Intrinsic<
23422342
],
23432343
[IntrNoMem, IntrConvergent, IntrWillReturn, IntrNoCallback, IntrNoFree, ImmArg<ArgIndex<1>>]>;
23442344

2345-
multiclass AMDGPUWaveReduceOps<list<string> Operations> {
2346-
foreach Op = Operations in { def Op : AMDGPUWaveReduce; }
2345+
multiclass AMDGPUWaveReduceOps {
2346+
foreach Op = [
2347+
"umin", "min", "umax", "max", "uadd", "add", "usub", "sub", "and", "or",
2348+
"xor"
2349+
] in {
2350+
def Op : AMDGPUWaveReduce;
2351+
}
23472352
}
23482353

2349-
defvar Operations = [
2350-
"umin", "min", "umax", "max", "uadd", "add", "usub", "sub", "and", "or", "xor"
2351-
];
2352-
defm int_amdgcn_wave_reduce_ : AMDGPUWaveReduceOps<Operations>;
2354+
defm int_amdgcn_wave_reduce_ : AMDGPUWaveReduceOps;
23532355

23542356
def int_amdgcn_readfirstlane :
23552357
Intrinsic<[llvm_any_ty], [LLVMMatchType<0>],

llvm/lib/Target/AMDGPU/SIISelLowering.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5182,7 +5182,7 @@ static MachineBasicBlock *lowerWaveReduce(MachineInstr &MI,
51825182
unsigned MovOpc = IsWave32 ? AMDGPU::S_MOV_B32 : AMDGPU::S_MOV_B64;
51835183
unsigned ExecReg = IsWave32 ? AMDGPU::EXEC_LO : AMDGPU::EXEC;
51845184

5185-
// Create initail values of induction variable from Exec, Accumulator and
5185+
// Create initial values of induction variable from Exec, Accumulator and
51865186
// insert branch instr to newly created ComputeBlock
51875187
uint32_t InitalValue = getIdentityValueForWaveReduction(Opc);
51885188
auto TmpSReg =

0 commit comments

Comments
 (0)