[all-commits] [llvm/llvm-project] 5e85e1: [mlir][vector] Fix VectorToSCF in-bounds check for...
Prashanth via All-commits
all-commits at lists.llvm.org
Wed Sep 30 11:40:51 PDT 2026
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 5e85e1345fb7f64ae2ce85d5cd2c670e99e6f6cc
https://github.com/llvm/llvm-project/commit/5e85e1345fb7f64ae2ce85d5cd2c670e99e6f6cc
Author: Prashanth <ping at starone01.me>
Date: 2026-09-30 (Wed, 30 Sep 2026)
Changed paths:
M mlir/lib/Conversion/VectorToSCF/VectorToSCF.cpp
M mlir/test/Conversion/VectorToSCF/vector-to-scf.mlir
Log Message:
-----------
[mlir][vector] Fix VectorToSCF in-bounds check for negative indices (#224843)
generateInBoundsCheck used a signed comparison (sgt) to guard the
runtime in-bounds branch. A negative dynamic index satisfies the signed
comparison against the upper bound and is incorrectly treated as
in-bounds, permitting an out-of-bounds access.
Switch to an unsigned comparison (ugt): a negative value reinterpreted
as unsigned becomes larger than any valid bound, so the existing
upper-bound check alone now also correctly rejects negative indices.
Fixes #223258
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