[flang] Support late math lowering for intrinsics from the llvm table.
authorSlava Zakharin <szakharin@nvidia.com>
Mon, 18 Jul 2022 22:49:24 +0000 (15:49 -0700)
committerSlava Zakharin <szakharin@nvidia.com>
Tue, 19 Jul 2022 21:07:59 +0000 (14:07 -0700)
commitfd4afa7a29061e51e8b18e83afa5c5172ee76aa0
tree5667a0c494922c9e8b3dcee0b36b156b66993207
parent0bc100986c2502eee8839242fd45894dac67f441
[flang] Support late math lowering for intrinsics from the llvm table.

mathOperations should now support all intrinsics that are handled
by the llvmIntrinsics table + `tan` lowered as Math dialect operation +
f128 flavor of abs.

I am going to flip the default to late math lowering after this change,
but still keep the fallback via pgmath. This will allow getting rid
of the llvmIntrinsics table and continue populating
only the mathOperations table, otherwise, updating both tables
seems to be inconvenient.

Differential Revision: https://reviews.llvm.org/D130048
flang/lib/Lower/IntrinsicCall.cpp
flang/test/Intrinsics/late-math-codegen.fir
flang/test/Lower/Intrinsics/abs.f90
flang/test/Lower/late-math-lowering.f90