[all-commits] [llvm/llvm-project] 0db5d2: [LV] Use index type for base pointer computation i...
Mel Chen via All-commits
all-commits at lists.llvm.org
Mon Jun 8 00:43:47 PDT 2026
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 0db5d27170ba624b1b409cc68a1868023b4c41ef
https://github.com/llvm/llvm-project/commit/0db5d27170ba624b1b409cc68a1868023b4c41ef
Author: Mel Chen <mel.chen at sifive.com>
Date: 2026-06-08 (Mon, 08 Jun 2026)
Changed paths:
M llvm/lib/Transforms/Vectorize/VPlanTransforms.cpp
M llvm/test/Transforms/LoopVectorize/RISCV/dead-ops-cost.ll
M llvm/test/Transforms/LoopVectorize/RISCV/masked_gather_scatter.ll
M llvm/test/Transforms/LoopVectorize/RISCV/strided-access-wide-stride.ll
M llvm/test/Transforms/LoopVectorize/RISCV/strided-accesses-narrow-iv.ll
M llvm/test/Transforms/LoopVectorize/RISCV/strided-accesses.ll
M llvm/test/Transforms/LoopVectorize/RISCV/truncate-to-minimal-bitwidth-cost.ll
Log Message:
-----------
[LV] Use index type for base pointer computation in convertToStridedAccesses (#201070)
The base pointer for strided accesses was computed as:
```
offset = canonicalIV * stride
base_ptr = ptradd start, offset
```
On a 64-bit target, if the canonical IV type is i32, the GEP operation
for ptradd will first sign-extend the offset to i64. Once the offset
multiplication has already overflowed in i32, it will ultimately result
in an incorrect base address.
This patch fixes this by extending the canonical IV to the index type
before the offset multiplication.
Based on #199647
Fixes #199640
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list