[all-commits] [llvm/llvm-project] 5d0bfd: [MLIR][SCFToGPU] Guard operands before AffineApply...
Shashi Shankar via All-commits
all-commits at lists.llvm.org
Thu Nov 20 06:20:56 PST 2025
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 5d0bfd1bf8ac6b1ceb37c7f30058d0f62e636036
https://github.com/llvm/llvm-project/commit/5d0bfd1bf8ac6b1ceb37c7f30058d0f62e636036
Author: Shashi Shankar <shashishankar1687 at gmail.com>
Date: 2025-11-20 (Thu, 20 Nov 2025)
Changed paths:
M mlir/lib/Conversion/SCFToGPU/SCFToGPU.cpp
M mlir/test/Conversion/SCFToGPU/parallel_loop.mlir
Log Message:
-----------
[MLIR][SCFToGPU] Guard operands before AffineApplyOp::create to avoid crash (#167959)
This fixes a crash in SCF→GPU when building the per‑dim index for mapped
scf.parallel.
**Change**:
- Map step/lb through cloningMap, then run ensureLaunchIndependent.
- If either is still unavailable at launch scope, emit a match‑failure;
otherwise build the affine.apply.
**Why this is correct:**
- Matches how the pass already handles launch bounds; avoids creating an
op with invalid operands and replaces a segfault with a clear
diagnostic.
**Tests**:
- Added two small regressions that lower to gpu.launch and exercise the
affine.apply path.
Fixes : #167654
Signed-off-by: Shashi Shankar <shashishankar1687 at gmail.com>
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