@@ -257,7 +257,7 @@ class SPIRVInstructionSelector : public InstructionSelector {
257257 MachineInstr &I) const ;
258258
259259 bool selectWaveActiveCountBits (Register ResVReg, const SPIRVType *ResType,
260- MachineInstr &I) const ;
260+ MachineInstr &I) const ;
261261
262262 bool selectWaveReadLaneAt (Register ResVReg, const SPIRVType *ResType,
263263 MachineInstr &I) const ;
@@ -1920,9 +1920,8 @@ bool SPIRVInstructionSelector::selectSign(Register ResVReg,
19201920 return Result;
19211921}
19221922
1923- bool SPIRVInstructionSelector::selectWaveActiveCountBits (Register ResVReg,
1924- const SPIRVType *ResType,
1925- MachineInstr &I) const {
1923+ bool SPIRVInstructionSelector::selectWaveActiveCountBits (
1924+ Register ResVReg, const SPIRVType *ResType, MachineInstr &I) const {
19261925 assert (I.getNumOperands () == 3 );
19271926 assert (I.getOperand (2 ).isReg ());
19281927 MachineBasicBlock &BB = *I.getParent ();
@@ -1932,22 +1931,21 @@ bool SPIRVInstructionSelector::selectWaveActiveCountBits(Register ResVReg,
19321931 SPIRVType *BallotType = GR.getOrCreateSPIRVVectorType (IntTy, 4 , I, TII);
19331932
19341933 bool Result =
1935- BuildMI (BB, I, I.getDebugLoc (),
1936- TII.get (SPIRV::OpGroupNonUniformBallot))
1934+ BuildMI (BB, I, I.getDebugLoc (), TII.get (SPIRV::OpGroupNonUniformBallot))
19371935 .addDef (BallotReg)
19381936 .addUse (GR.getSPIRVTypeID (BallotType))
19391937 .addUse (GR.getOrCreateConstInt (SPIRV::Scope::Subgroup, I, IntTy, TII))
19401938 .addUse (I.getOperand (2 ).getReg ());
19411939
19421940 Result |=
1943- BuildMI (BB, I, I.getDebugLoc (),
1944- TII.get (SPIRV::OpGroupNonUniformBallotBitCount))
1945- .addDef (ResVReg)
1946- .addUse (GR.getSPIRVTypeID (ResType))
1947- .addUse (GR.getOrCreateConstInt (SPIRV::Scope::Subgroup, I, IntTy, TII))
1948- .addImm (0 )
1949- .addUse (BallotReg)
1950- .constrainAllUses (TII, TRI, RBI);
1941+ BuildMI (BB, I, I.getDebugLoc (),
1942+ TII.get (SPIRV::OpGroupNonUniformBallotBitCount))
1943+ .addDef (ResVReg)
1944+ .addUse (GR.getSPIRVTypeID (ResType))
1945+ .addUse (GR.getOrCreateConstInt (SPIRV::Scope::Subgroup, I, IntTy, TII))
1946+ .addImm (0 )
1947+ .addUse (BallotReg)
1948+ .constrainAllUses (TII, TRI, RBI);
19511949
19521950 return Result;
19531951}
0 commit comments