[all-commits] [llvm/llvm-project] d0c882: [flang][codegen] Report a shape or slice cg-rewrit...
Kareem Ergawy via All-commits
all-commits at lists.llvm.org
Thu Oct 1 09:59:40 PDT 2026
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: d0c882a37955edfc3f7354676506bd0e50946862
https://github.com/llvm/llvm-project/commit/d0c882a37955edfc3f7354676506bd0e50946862
Author: Kareem Ergawy <kergawy at nvidia.com>
Date: 2026-10-01 (Thu, 01 Oct 2026)
Changed paths:
M flang/lib/Optimizer/CodeGen/PreCGRewrite.cpp
A flang/test/Fir/cg-rewrite-unfoldable-slice.fir
Log Message:
-----------
[flang][codegen] Report a shape or slice cg-rewrite cannot read (#227625)
cg-rewrite folds a fir.shape, fir.shape_shift, fir.shift or fir.slice
into the code-gen form by reading it through its defining op. A value
that has none cannot be folded. For a slice this went unreported: the
rewrite dropped it and produced a descriptor for the whole array rather
than the section it names. For a shape it reached a cast on a null
defining op.
Report it instead, and say which operand. Rebuilding the value covers a
block argument, but not every case: a slice chosen by an arith.select
has no single value to take apart.
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