This is an archive of the discontinued LLVM Phabricator instance.

[flang] lower all intrinsic to hlfir.all operation
ClosedPublic

Authored by jacob-crawley on May 22 2023, 8:43 AM.

Details

Summary

Carries out the lowering of the all intrinsic into HLFIR

Diff Detail

Event Timeline

jacob-crawley created this revision.May 22 2023, 8:43 AM
Herald added projects: Restricted Project, Restricted Project. · View Herald TranscriptMay 22 2023, 8:43 AM
jacob-crawley requested review of this revision.May 22 2023, 8:43 AM
tblah added inline comments.May 22 2023, 8:53 AM
flang/lib/Lower/ConvertCall.cpp
1447

This is very similar to buildNumericalReductionIntrinsic. You could combine these into one by passing a boolean to control whether there is a separate mask value or not.

The only tricky bit here would be the different number of arguments to the buildFunc. It is a bit messy, but I think the easiest would be to have an extra unused mlir::Value argument to the build functions for the logical reductions and initialize it with nullptr when it is unused.

Thanks for the review.

Combined the logic of buildNumericalReductionIntrinsic and
buildLogicalReductionIntrinsic into a single function.

tblah accepted this revision.May 23 2023, 3:29 AM

Thanks!

This revision is now accepted and ready to land.May 23 2023, 3:29 AM
jeanPerier accepted this revision.May 25 2023, 3:03 AM

Thanks, LGTM