[flang-commits] [PATCH] D114241: [fir] Add !fir.len_param_index conversion

Andrzej Warzynski via Phabricator via flang-commits flang-commits at lists.llvm.org
Mon Nov 22 02:33:39 PST 2021


awarzynski added a comment.

It sounds like this Op is incomplete/incorrect and not needed. I would be in favor of turning this into a `TODO` - otherwise it's just too confusing. But it will only makes sense if we do the same on `fir-dev`. WDYT?



================
Comment at: flang/test/Fir/convert-to-llvm-target.fir:162
+  %5 = fir.len_param_index l2, !fir.type<twolens>
+  %6 = fir.len_param_index l, !fir.type<twolens>
+
----------------
schweitz wrote:
> jeanPerier wrote:
> > rovka wrote:
> > > Why does it work to use the names of fields? I would expect it to blow up if we pass something that isn't a len param.
> > I agree the verifier should complain, it makes no sense to not use a len parameter name.
> It should _not_ accept field names.
So the example in FIROps.td is incorrect, right? https://github.com/llvm/llvm-project/blob/d92aabc33666e83612c93e7c9c5c454510ba9b07/flang/include/flang/Optimizer/Dialect/FIROps.td#L2002-L2004


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D114241/new/

https://reviews.llvm.org/D114241



More information about the flang-commits mailing list