[llvm] [VPlan] Improve cast code in VPlanRecipes (NFC) (PR #141240)
Ramkumar Ramachandra via llvm-commits
llvm-commits at lists.llvm.org
Tue May 27 01:58:23 PDT 2025
================
@@ -85,8 +85,8 @@ bool VPRecipeBase::mayWriteToMemory() const {
case VPWidenPHISC:
case VPWidenSC:
case VPWidenSelectSC: {
- const Instruction *I =
- dyn_cast_or_null<Instruction>(getVPSingleValue()->getUnderlyingValue());
+ const Instruction *I = dyn_cast_if_present<Instruction>(
----------------
artagnon wrote:
Yes, they're equivalent, but there's a comment in the file saying that the latter has been deprecated, but I'm not sure if we're making an effort to get rid of it.
https://github.com/llvm/llvm-project/pull/141240
More information about the llvm-commits
mailing list