[flang] Generate DOT_PRODUCT runtime call based on the result type.
authorSlava Zakharin <szakharin@nvidia.com>
Wed, 31 Aug 2022 16:55:24 +0000 (09:55 -0700)
committerSlava Zakharin <szakharin@nvidia.com>
Wed, 31 Aug 2022 22:20:12 +0000 (15:20 -0700)
commit69193c6cd73bb43c4c1970914b962e8e568dd092
tree30bbdf2092264f9b43276e937205313a1b6c7dc2
parentf8a9f43ef7affb7991e60cdd5ce93d2566f5b2e4
[flang] Generate DOT_PRODUCT runtime call based on the result type.

We used to select the runtime function based on the first argument's
type, which was not correct behavior. The selection is done using
the result type now.

Differential Revision: https://reviews.llvm.org/D133032
flang/lib/Lower/IntrinsicCall.cpp
flang/lib/Optimizer/Builder/Runtime/Reduction.cpp
flang/test/Lower/Intrinsics/dot_product.f90
flang/unittests/Optimizer/Builder/Runtime/ReductionTest.cpp