[llvm] [VPlan] Use target's index type for {First,Last}ActiveLane instead of i64 (PR #186361)

Ramkumar Ramachandra via llvm-commits llvm-commits at lists.llvm.org
Fri Mar 13 04:47:07 PDT 2026


================
@@ -25,6 +25,10 @@ using namespace VPlanPatternMatch;
 #define DEBUG_TYPE "vplan"
 
 VPTypeAnalysis::VPTypeAnalysis(const VPlan &Plan) : Ctx(Plan.getContext()) {
+  const DataLayout &DL =
+      Plan.getScalarHeader()->getIRBasicBlock()->getDataLayout();
+  IndexTy = DL.getIndexType(PointerType::get(Plan.getContext(), 0));
----------------
artagnon wrote:

Couldn't we could have the ptr type accepted as an argument, make the DL available, and pass `PointerType::get(Plan.getContext(), DL.getAllocaAddrSpace())` for this use-case?

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


More information about the llvm-commits mailing list