Skip to content

Commit 0b6f9c4

Browse files
committed
Address comments
1 parent 74008ff commit 0b6f9c4

File tree

2 files changed

+9
-5
lines changed

2 files changed

+9
-5
lines changed

llvm/lib/Target/SPIRV/SPIRVInstructionSelector.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1952,8 +1952,8 @@ bool SPIRVInstructionSelector::selectWaveOpInst(Register ResVReg,
19521952
.addUse(GR.getOrCreateConstInt(SPIRV::Scope::Subgroup, I,
19531953
IntTy, TII));
19541954

1955-
for (unsigned j = 2; j < I.getNumOperands(); j++) {
1956-
BMI.addUse(I.getOperand(j).getReg());
1955+
for (unsigned J = 2; J < I.getNumOperands(); J++) {
1956+
BMI.addUse(I.getOperand(J).getReg());
19571957
}
19581958

19591959
return BMI.constrainAllUses(TII, TRI, RBI);

llvm/test/CodeGen/SPIRV/hlsl-intrinsics/WaveActiveAnyTrue.ll

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,18 @@
44
; CHECK-DAG: %[[#bool:]] = OpTypeBool
55
; CHECK-DAG: %[[#uint:]] = OpTypeInt 32 0
66
; CHECK-DAG: %[[#scope:]] = OpConstant %[[#uint]] 3
7+
; CHECK-DAG: OpCapability GroupNonUniformVote
78

89
; CHECK-LABEL: Begin function test_wave_any
9-
define i1 @test_wave_any(i1 %p1) {
10+
define i1 @test_wave_any(i1 %p1) #0 {
1011
entry:
1112
; CHECK: %[[#param:]] = OpFunctionParameter %[[#bool]]
1213
; CHECK: %{{.+}} = OpGroupNonUniformAny %[[#bool]] %[[#scope]] %[[#param]]
13-
%ret = call i1 @llvm.spv.wave.any(i1 %p1)
14+
%0 = call token @llvm.experimental.convergence.entry()
15+
%ret = call i1 @llvm.spv.wave.any(i1 %p1) [ "convergencectrl"(token %0) ]
1416
ret i1 %ret
1517
}
1618

17-
declare i1 @llvm.spv.wave.any(i1)
19+
declare i1 @llvm.spv.wave.any(i1) #0
20+
21+
attributes #0 = { convergent }

0 commit comments

Comments
 (0)