@@ -231,7 +231,7 @@ class SPIRVInstructionSelector : public InstructionSelector {
231
231
MachineInstr &I) const ;
232
232
233
233
bool selectWaveActiveCountBits (Register ResVReg, const SPIRVType *ResType,
234
- MachineInstr &I) const ;
234
+ MachineInstr &I) const ;
235
235
236
236
bool selectWaveReadLaneAt (Register ResVReg, const SPIRVType *ResType,
237
237
MachineInstr &I) const ;
@@ -1765,9 +1765,8 @@ bool SPIRVInstructionSelector::selectSign(Register ResVReg,
1765
1765
return Result;
1766
1766
}
1767
1767
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 {
1771
1770
assert (I.getNumOperands () == 3 );
1772
1771
assert (I.getOperand (2 ).isReg ());
1773
1772
MachineBasicBlock &BB = *I.getParent ();
@@ -1777,22 +1776,21 @@ bool SPIRVInstructionSelector::selectWaveActiveCountBits(Register ResVReg,
1777
1776
SPIRVType *BallotType = GR.getOrCreateSPIRVVectorType (IntTy, 4 , I, TII);
1778
1777
1779
1778
bool Result =
1780
- BuildMI (BB, I, I.getDebugLoc (),
1781
- TII.get (SPIRV::OpGroupNonUniformBallot))
1779
+ BuildMI (BB, I, I.getDebugLoc (), TII.get (SPIRV::OpGroupNonUniformBallot))
1782
1780
.addDef (BallotReg)
1783
1781
.addUse (GR.getSPIRVTypeID (BallotType))
1784
1782
.addUse (GR.getOrCreateConstInt (SPIRV::Scope::Subgroup, I, IntTy, TII))
1785
1783
.addUse (I.getOperand (2 ).getReg ());
1786
1784
1787
1785
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);
1796
1794
1797
1795
return Result;
1798
1796
}
0 commit comments