Skip to content

Commit cff8387

Browse files
committed
review comments:
- get the proper register class - use result and instead of or
1 parent 3180f0f commit cff8387

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

llvm/lib/Target/SPIRV/SPIRVInstructionSelector.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1926,9 +1926,9 @@ bool SPIRVInstructionSelector::selectWaveActiveCountBits(
19261926
assert(I.getOperand(2).isReg());
19271927
MachineBasicBlock &BB = *I.getParent();
19281928

1929-
Register BallotReg = MRI->createVirtualRegister(&SPIRV::IDRegClass);
19301929
SPIRVType *IntTy = GR.getOrCreateSPIRVIntegerType(32, I, TII);
19311930
SPIRVType *BallotType = GR.getOrCreateSPIRVVectorType(IntTy, 4, I, TII);
1931+
Register BallotReg = MRI->createVirtualRegister(GR.getRegClass(BallotType));
19321932

19331933
bool Result =
19341934
BuildMI(BB, I, I.getDebugLoc(), TII.get(SPIRV::OpGroupNonUniformBallot))
@@ -1938,7 +1938,7 @@ bool SPIRVInstructionSelector::selectWaveActiveCountBits(
19381938
.addUse(I.getOperand(2).getReg())
19391939
.constrainAllUses(TII, TRI, RBI);
19401940

1941-
Result |=
1941+
Result &=
19421942
BuildMI(BB, I, I.getDebugLoc(),
19431943
TII.get(SPIRV::OpGroupNonUniformBallotBitCount))
19441944
.addDef(ResVReg)

0 commit comments

Comments
 (0)