[llvm] [VPlan] Replace ExtractLast(Elem|LanePerPart) with ExtractLast(Lane/Part) (PR #164124)
David Sherwood via llvm-commits
llvm-commits at lists.llvm.org
Mon Nov 10 05:29:33 PST 2025
================
@@ -116,14 +116,18 @@ Type *VPTypeAnalysis::inferScalarTypeForRecipe(const VPInstruction *R) {
return inferScalarType(R->getOperand(1));
case VPInstruction::FirstActiveLane:
return Type::getIntNTy(Ctx, 64);
- case VPInstruction::ExtractLastElement:
- case VPInstruction::ExtractLastLanePerPart:
+ case VPInstruction::ExtractLastLane:
----------------
david-arm wrote:
The comment above `ExtractLastLane` suggests this is exclusively for vector operands. It's probably worth either having it as a separate case like this:
```
case VPInstruction::ExtractLastLane: {
Type *BaseTy = inferScalarType(R->getOperand(0));
return cast<VectorType>(BaseTy)->getElementType();
}
```
or asserting that `VecTy` is not null for ExtractLastLane.
https://github.com/llvm/llvm-project/pull/164124
More information about the llvm-commits
mailing list