[flang][hlfir] Added missing fir.convert for i1 result of hlfir.dot_product.
authorSlava Zakharin <szakharin@nvidia.com>
Fri, 21 Jul 2023 19:11:51 +0000 (12:11 -0700)
committerSlava Zakharin <szakharin@nvidia.com>
Fri, 21 Jul 2023 19:56:51 +0000 (12:56 -0700)
commit8c33630e15c8c630804058f0820b8876e5674d71
tree76285b9ebf1eb0a817e123c84b80353ce74074fe
parenta262081a22001b59073a7bd1ce8bd1dd33e288c4
[flang][hlfir] Added missing fir.convert for i1 result of hlfir.dot_product.

Some operations using the result of hlfir.dot_product can tolerate
that the type of the result changes from !fir.logical to i1 during
intrinsics lowering, but some won't. I added a separate LIT case with
fir.store to mimic one of the nag tests.

Reviewed By: kiranchandramohan

Differential Revision: https://reviews.llvm.org/D155914
flang/lib/Optimizer/HLFIR/Transforms/LowerHLFIRIntrinsics.cpp
flang/test/HLFIR/dot_product-lowering.fir