[llvm] [AMDGPU] Switch V_CNDMASK operands to shrink it into VOP2 (PR #135162)
Mirko BrkuĊĦanin via llvm-commits
llvm-commits at lists.llvm.org
Fri Apr 11 10:04:00 PDT 2025
================
@@ -1010,6 +1162,9 @@ bool SIShrinkInstructions::run(MachineFunction &MF) {
// provide a hint to the register allocator to use VCC and then we
// will run this pass again after RA and shrink it if it outputs to
// VCC.
+ Register NewVCC = trySwapCndOperands(MI);
+ DstReg = NewVCC == AMDGPU::NoRegister ? DstReg : NewVCC;
----------------
mbrkusanin wrote:
Also, why don't you just have trySwapCndOperands return old DstReg instead and have this just be:
DstReg = trySwapCndOperands(MI);
https://github.com/llvm/llvm-project/pull/135162
More information about the llvm-commits
mailing list