[flang] Add fastmath flags to localBuilder in IntrinsicCall
authorDavid Truby <david@truby.dev>
Thu, 6 Jul 2023 14:32:30 +0000 (15:32 +0100)
committerDavid Truby <david@truby.dev>
Tue, 11 Jul 2023 17:53:31 +0000 (18:53 +0100)
commitf52c64b115a872cd059549613c06e90e9954dc79
treee0c8c3bd1f59c56064aea13decdf586cada67773
parent7b64d761098fdbb426b27ca58a9dc8f31917dcba
[flang] Add fastmath flags to localBuilder in IntrinsicCall

Currently the local builder used in IntrinsicCall doesn't have the
fastmath flags passed to it. This results in the fastmath attribute
not being added to certain runtime calls. This patch simply forwards
the fastmath flags from the parent builder.

Differential Revision: https://reviews.llvm.org/D154611
flang/include/flang/Optimizer/Builder/FIRBuilder.h
flang/lib/Optimizer/Builder/IntrinsicCall.cpp
flang/lib/Optimizer/Transforms/SimplifyIntrinsics.cpp
flang/test/Lower/Intrinsics/exp.f90
flang/test/Lower/Intrinsics/log.f90
flang/test/Lower/Intrinsics/math-runtime-options.f90
flang/test/Lower/array-expression-slice-1.f90
flang/test/Lower/dummy-procedure.f90
flang/test/Lower/intrinsic-procedure-wrappers.f90
flang/test/Lower/sqrt.f90
flang/test/Lower/trigonometric-intrinsics.f90