[llvm] [AMDGPU] Simplify and improve codegen for llvm.amdgcn.set.inactive (PR #107889)
Matt Arsenault via llvm-commits
llvm-commits at lists.llvm.org
Wed Sep 11 03:31:26 PDT 2024
================
@@ -1078,10 +1070,12 @@ void SIWholeQuadMode::lowerBlock(MachineBasicBlock &MBB) {
ActiveLanesReg = 0;
break;
case AMDGPU::V_SET_INACTIVE_B32:
- case AMDGPU::V_SET_INACTIVE_B64:
if (ActiveLanesReg) {
- MI.addOperand(*MBB.getParent(),
- MachineOperand::CreateReg(ActiveLanesReg, false, true));
+ LiveInterval &LI = LIS->getInterval(MI.getOperand(5).getReg());
+ MRI->constrainRegClass(
+ ActiveLanesReg, TRI->getRegClass(AMDGPU::SReg_1_XEXECRegClassID));
----------------
arsenm wrote:
Calling getWaveMaskRegClass is more straightforward?
https://github.com/llvm/llvm-project/pull/107889
More information about the llvm-commits
mailing list