[llvm] [AArch64][GlobalISel] Avoid generating inserts for undefs when selecting G_BUILD_VECTOR (PR #84452)

Madhur Amilkanthwar via llvm-commits llvm-commits at lists.llvm.org
Fri Mar 8 02:19:59 PST 2024


================
@@ -5963,12 +5966,20 @@ bool AArch64InstructionSelector::selectBuildVector(MachineInstr &I,
     MachineOperand &RegOp = I.getOperand(1);
     RegOp.setReg(Reg);
     RBI.constrainGenericRegister(DstReg, *RC, MRI);
-  } else {
+  } else if (PrevMI) {
----------------
madhur13490 wrote:

Please explain in comments why `else if(PrevMi)` is needed. 


https://github.com/llvm/llvm-project/pull/84452


More information about the llvm-commits mailing list