[flang-commits] [PATCH] D129616: Lower F08 bitwise-reduction intrinsics (IALL, IANY, IPARITY)

Peixin Qiao via Phabricator via flang-commits flang-commits at lists.llvm.org
Fri Sep 16 02:39:10 PDT 2022


peixin added a comment.

No test cases?

Can the runtime support the following special case?
IALL: If ARRAY has size zero the result value is equal to NOT (INT (0, KIND (ARRAY))).



================
Comment at: flang/lib/Lower/IntrinsicCall.cpp:811
+     {{{"array", asBox},
+       {"dim", asValue},
+       {"mask", asBox, handleDynamicOptional}}},
----------------
Should `dim` also be `handleDynamicOptional` to support the case `IALL (ARRAY [, MASK])`? Same for `iany`.


================
Comment at: flang/lib/Optimizer/Builder/Runtime/Reduction.cpp:378
+struct ForcedIAll16 {
+  static constexpr const char *name = EXPAND_AND_QUOTE(IAll16);
+  static constexpr fir::runtime::FuncTypeBuilderFunc getTypeModel() {
----------------
This is not consistent with others. Should `#define EXPAND_AND_QUOTE(S) ExpandAndQuoteKey(RTNAME(S))` be moved to where `ExpandAndQuoteKey` is defined?


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

https://reviews.llvm.org/D129616



More information about the flang-commits mailing list