@@ -231,7 +231,7 @@ class SPIRVInstructionSelector : public InstructionSelector {
231231 MachineInstr &I) const ;
232232
233233 bool selectWaveActiveCountBits (Register ResVReg, const SPIRVType *ResType,
234- MachineInstr &I) const ;
234+ MachineInstr &I) const ;
235235
236236 bool selectWaveReadLaneAt (Register ResVReg, const SPIRVType *ResType,
237237 MachineInstr &I) const ;
@@ -1765,9 +1765,8 @@ bool SPIRVInstructionSelector::selectSign(Register ResVReg,
17651765 return Result;
17661766}
17671767
1768- bool SPIRVInstructionSelector::selectWaveActiveCountBits (Register ResVReg,
1769- const SPIRVType *ResType,
1770- MachineInstr &I) const {
1768+ bool SPIRVInstructionSelector::selectWaveActiveCountBits (
1769+ Register ResVReg, const SPIRVType *ResType, MachineInstr &I) const {
17711770 assert (I.getNumOperands () == 3 );
17721771 assert (I.getOperand (2 ).isReg ());
17731772 MachineBasicBlock &BB = *I.getParent ();
@@ -1777,22 +1776,21 @@ bool SPIRVInstructionSelector::selectWaveActiveCountBits(Register ResVReg,
17771776 SPIRVType *BallotType = GR.getOrCreateSPIRVVectorType (IntTy, 4 , I, TII);
17781777
17791778 bool Result =
1780- BuildMI (BB, I, I.getDebugLoc (),
1781- TII.get (SPIRV::OpGroupNonUniformBallot))
1779+ BuildMI (BB, I, I.getDebugLoc (), TII.get (SPIRV::OpGroupNonUniformBallot))
17821780 .addDef (BallotReg)
17831781 .addUse (GR.getSPIRVTypeID (BallotType))
17841782 .addUse (GR.getOrCreateConstInt (SPIRV::Scope::Subgroup, I, IntTy, TII))
17851783 .addUse (I.getOperand (2 ).getReg ());
17861784
17871785 Result |=
1788- BuildMI (BB, I, I.getDebugLoc (),
1789- TII.get (SPIRV::OpGroupNonUniformBallotBitCount))
1790- .addDef (ResVReg)
1791- .addUse (GR.getSPIRVTypeID (ResType))
1792- .addUse (GR.getOrCreateConstInt (SPIRV::Scope::Subgroup, I, IntTy, TII))
1793- .addImm (0 )
1794- .addUse (BallotReg)
1795- .constrainAllUses (TII, TRI, RBI);
1786+ BuildMI (BB, I, I.getDebugLoc (),
1787+ TII.get (SPIRV::OpGroupNonUniformBallotBitCount))
1788+ .addDef (ResVReg)
1789+ .addUse (GR.getSPIRVTypeID (ResType))
1790+ .addUse (GR.getOrCreateConstInt (SPIRV::Scope::Subgroup, I, IntTy, TII))
1791+ .addImm (0 )
1792+ .addUse (BallotReg)
1793+ .constrainAllUses (TII, TRI, RBI);
17961794
17971795 return Result;
17981796}
0 commit comments