[llvm] [VPlan] Add VPConstantInt for VPIRValues wrapping ConstantInts (NFC) (PR #175458)
Florian Hahn via llvm-commits
llvm-commits at lists.llvm.org
Mon Jan 12 04:08:49 PST 2026
================
@@ -109,17 +109,13 @@ template <typename Pred, unsigned BitWidth = 0> struct int_pred_ty {
auto *VPI = dyn_cast<VPInstruction>(VPV);
if (VPI && VPI->getOpcode() == VPInstruction::Broadcast)
VPV = VPI->getOperand(0);
- auto *IRV = dyn_cast<VPIRValue>(VPV);
- if (!IRV)
- return false;
- assert(!IRV->getType()->isVectorTy() && "Unexpected vector live-in");
- const auto *CI = dyn_cast<ConstantInt>(IRV->getValue());
+ auto *CI = dyn_cast<VPConstantInt>(VPV);
if (!CI)
return false;
- if (BitWidth != 0 && CI->getBitWidth() != BitWidth)
+ if (BitWidth != 0 && CI->getAPInt().getBitWidth() != BitWidth)
----------------
fhahn wrote:
done thanks
https://github.com/llvm/llvm-project/pull/175458
More information about the llvm-commits
mailing list