[all-commits] [llvm/llvm-project] 36f12f: [FIR] Route embox + projected complex slice throug...

Kareem Ergawy via All-commits all-commits at lists.llvm.org
Wed Jun 24 03:46:37 PDT 2026


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 36f12f975f395cab406f161086b6a808ea0440af
      https://github.com/llvm/llvm-project/commit/36f12f975f395cab406f161086b6a808ea0440af
  Author: Kareem Ergawy <kergawy at nvidia.com>
  Date:   2026-06-24 (Wed, 24 Jun 2026)

  Changed paths:
    M flang/lib/Optimizer/Transforms/FIRToMemRef.cpp
    M flang/test/Transforms/FIRToMemRef/slice-projected.mlir

  Log Message:
  -----------
  [FIR] Route embox + projected complex slice through shapeVec (#205042)

When the array_coor base is a fir.embox with a projected complex %re/%im
slice, take the shapeVec path instead of the descriptor (fir.box_dims)
path. The descriptor path iterates source-rank dims while querying the
rank-reduced embox result box, which miscompiles slices that collapse
dims (e.g. complex(:,k)%re). For embox-derived boxes the underlying
storage is contiguous, so the shape-derived layout is both correct and
the natural place to encode that static shape is available. Non-embox
boxes (rebox, assumed-shape) still go through fir.box_dims.

Co-Authored-By: Claude Sonnet 4.6 <noreply at anthropic.com>

Co-authored-by: Claude Sonnet 4.6 <noreply at anthropic.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