[all-commits] [llvm/llvm-project] 926164: [flang][codegen] Report a shape or slice cg-rewrit...
Kareem Ergawy via All-commits
all-commits at lists.llvm.org
Wed Sep 30 06:18:08 PDT 2026
Branch: refs/heads/users/ergawy/fir-report-unfoldable-shape-slice
Home: https://github.com/llvm/llvm-project
Commit: 926164538762be44d04ccd23b89c2dd523378eb8
https://github.com/llvm/llvm-project/commit/926164538762be44d04ccd23b89c2dd523378eb8
Author: ergawy <kareem.ergawy at gmail.com>
Date: 2026-09-30 (Wed, 30 Sep 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
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