The shared code for lowering the sum and product operations in
flang/lib/Optimizer/HLFIR/Transforms/LowerHLFIRIntrinsics.cpp have
been moved into a new class HlfirReductionIntrinsicConverion.
Depends on: D148719
Paths
| Differential D149644
[flang][hlfir] lower hlfir.product into fir runtime call ClosedPublic Authored by jacob-crawley on May 2 2023, 4:02 AM.
Details Summary The shared code for lowering the sum and product operations in Depends on: D148719
Diff Detail
Event TimelineHerald added projects: Restricted Project, Restricted Project. · View Herald TranscriptMay 2 2023, 4:02 AM
tblah added a parent revision: D148719: [flang] lower product intrinsic to hlfir.product operation.May 2 2023, 4:47 AM Comment Actions Thanks for the review, Added a case to check for hlfir::ProductOp and return mlir::failure() Comment Actions Thanks looks good
Comment Actions Thanks for that tip, the "convertReductionIntrinsic" method has been altered to a public This revision is now accepted and ready to land.May 3 2023, 12:04 AM Closed by commit rG7c57195c49c7: [flang][hlfir] lower hlfir.product into fir runtime call (authored by jacob-crawley). · Explain WhyMay 4 2023, 4:24 AM This revision was automatically updated to reflect the committed changes.
Revision Contents
Diff 519431 flang/lib/Optimizer/HLFIR/Transforms/LowerHLFIRIntrinsics.cpp
flang/test/HLFIR/product-lowering.fir
|
There may be other reduction intrinsics added in the future, so I would still check std::is_same_v<OP, hflfir::ProductOp>. If it is neither you could return mlir::failure().
This if statement can be constexpr https://stackoverflow.com/questions/43434491/difference-between-if-constexpr-vs-if