[llvm] [AMDGPU] Detect kills in register sets when trying to form V_CMPX instructions. (PR #68293)

Thomas Symalla via llvm-commits llvm-commits at lists.llvm.org
Thu Oct 5 05:10:27 PDT 2023


================
@@ -599,6 +620,11 @@ bool SIOptimizeExecMasking::optimizeVCMPSaveExecSequence(
   if (Src1->isReg())
     MRI->clearKillFlags(Src1->getReg());
 
+  for (MachineOperand *MO : KillFlagCandidates) {
+    if (MO)
----------------
tsymalla wrote:

I can remove the check, it is just personal preference to nullptr-check if possible. You are right that it is likely there won't be a nullptr deref here.

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


More information about the llvm-commits mailing list