[llvm] [VPlan] Add VPInstruction to unpack vector values to scalars. (PR #155670)
Florian Hahn via llvm-commits
llvm-commits at lists.llvm.org
Sat Sep 20 12:54:53 PDT 2025
================
@@ -1228,8 +1230,6 @@ bool VPInstruction::onlyFirstLaneUsed(const VPValue *Op) const {
return getNumOperands() > 1;
case VPInstruction::PtrAdd:
return Op == getOperand(0) || vputils::onlyFirstLaneUsed(this);
- case VPInstruction::WidePtrAdd:
- return Op == getOperand(0);
----------------
fhahn wrote:
The current code here doesn't match the codegen for WidePtrAdd which is exposed by this patch; it only uses the first lane, if the pointer is a single scalar.
With this code, we would incorrectly insert an `unpack` and only provide the first lane instead of the vector pointers that is needed.
https://github.com/llvm/llvm-project/pull/155670
More information about the llvm-commits
mailing list