[PATCH] D113968: [fir] Add fircg.ext_array_coor conversion
Valentin Clement via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Nov 29 07:25:37 PST 2021
clementval added inline comments.
================
Comment at: flang/lib/Optimizer/CodeGen/CodeGen.cpp:1801-1804
+ auto indexOps = coor.indices().begin();
+ auto shapeOps = coor.shape().begin();
+ auto shiftOps = coor.shift().begin();
+ auto sliceOps = coor.slice().begin();
----------------
kiranchandramohan wrote:
> Nit: Since these are all for the `for` loop, would it be better to initialize it in the loop init section?
This doesn't work AFAIK or am I missing something?
================
Comment at: flang/test/Fir/convert-to-llvm.fir:1622
+ %c0 = arith.constant 0 : i64
+ %1 = fircg.ext_array_coor %arg0(%c0) origin %c0[%c0, %c0, %c0]<%c0> : (!fir.ref<!fir.array<?xi32>>, i64, i64, i64, i64, i64, i64) -> !fir.ref<i32>
+ return
----------------
kiranchandramohan wrote:
> Nit: Can we have a non-zero shift and slice? Also can the slice be of a different dimension (3) than the array (1)? Or have I misunderstood?
The slice for a rank has 3 operands (lower, upper and step).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D113968/new/
https://reviews.llvm.org/D113968
More information about the llvm-commits
mailing list