[llvm] [VPlan] Tweak getUnderlyingInstr to improve code (NFC) (PR #188939)

Luke Lau via llvm-commits llvm-commits at lists.llvm.org
Fri Mar 27 05:14:36 PDT 2026


================
@@ -3588,9 +3587,8 @@ void VPlanTransforms::dropPoisonGeneratingRecipes(
         } else
           RecWithFlags->dropPoisonGeneratingFlags();
       } else {
-        Instruction *Instr = dyn_cast_or_null<Instruction>(
-            CurRec->getVPSingleValue()->getUnderlyingValue());
-        (void)Instr;
+        [[maybe_unused]] Instruction *Instr =
+            CurRec->getVPSingleValue()->getUnderlyingInstr();
----------------
lukel97 wrote:

Just noting I think a VPRecipeWIthIRFlags should never have a non-instruction underlying value

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


More information about the llvm-commits mailing list