[PATCH] D114159: [flang][codegen] Add a conversion for `fir.coordinate_of` - part 1
Diana Picus via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Dec 9 01:32:09 PST 2021
rovka added a comment.
Seems fine, thanks.
In D114159#3175939 <https://reviews.llvm.org/D114159#3175939>, @awarzynski wrote:
> Allow dynamically sized arrays inside `!fir.box`.
>
> I mistakenly disallowed dynamically sized arrays earlier. However, IIUC, boxed arrays (and that's the only type of arrays dealt with in this patch) shouldn't require size when using `fir.coordinate_of`. In fact, `!fir.box<!fir.array<? x i32>>` should be no different to `!fir.box<!fir.array<? x i32>>` in this case.
I assume you mean !fir.ref<!fir.array<? x i32>> versus !fir.box<!fir.array<? x i32>> :)
================
Comment at: flang/test/Fir/convert-to-llvm.fir:2078
+func @coordinate_of_box_dynamic_array_1d(%arg0: !fir.box<!fir.array<? x f32>>, %arg1: index) {
+// expected-error at +1{{failed to legalize operation 'fir.coordinate_of'}}
+ %p = fir.coordinate_of %arg0, %arg1 : (!fir.box<!fir.array<? x f32>>, index) -> !fir.ref<f32>
----------------
Do we still expect an error here?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D114159/new/
https://reviews.llvm.org/D114159
More information about the llvm-commits
mailing list