[flang-commits] [PATCH] D151251: [flang][hlfir] Generate temporary storage in Forall/Where [2/2]

Jean Perier via Phabricator via flang-commits flang-commits at lists.llvm.org
Thu May 25 04:46:45 PDT 2023


jeanPerier added a comment.

Thanks for the review



================
Comment at: flang/lib/Optimizer/Builder/TemporaryStorage.cpp:215
+      hlfir::loadTrivialScalar(loc, builder, hlfir::Entity{retValueBox});
+  if (valueStaticType == builder.getI1Type())
+    return builder.createConvert(loc, valueStaticType, result);
----------------
tblah wrote:
> How about testing the type you get back against valueStaticType to see if they are different? That way, conversions other than `i1` -> `fir.logical` can be handled.
Good point, I merged this before seeing you comment, update in: https://reviews.llvm.org/D151428


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D151251



More information about the flang-commits mailing list