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

Tom Eccles via Phabricator via flang-commits flang-commits at lists.llvm.org
Thu May 25 03:21:16 PDT 2023


tblah added inline comments.


================
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);
----------------
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.


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