[flang] Set default to -ffpcontract=fast
authorTom Eccles <tom.eccles@arm.com>
Fri, 11 Nov 2022 20:00:18 +0000 (20:00 +0000)
committerTom Eccles <tom.eccles@arm.com>
Thu, 17 Nov 2022 15:49:51 +0000 (15:49 +0000)
commit4cc9437a7e649e2d1a1a47578f6ffb4d420b8d60
tree3c75fb70128ed6424d0f4ff5e43dcf6288c73a8a
parent3de46890489751c1308ebcf0fe509ad6e18af704
[flang] Set default to -ffpcontract=fast

Following RFC at
https://discourse.llvm.org/t/rfc-ffp-contract-default-value/66301

This adds the `fastmath<contract>` attribute to `fir.call` and some
floating point arithmetic operations (hence the many test changes).
Instead of testing for this specific attribute, I am using a regular
expression to match any attributes.
225 files changed:
flang/include/flang/Common/MathOptionsBase.def
flang/include/flang/Frontend/LangOptions.def
flang/test/Fir/achar.f90
flang/test/Lower/HLFIR/expr-addr.f90
flang/test/Lower/HLFIR/expr-value.f90
flang/test/Lower/Intrinsics/abort.f90
flang/test/Lower/Intrinsics/abs.f90
flang/test/Lower/Intrinsics/achar.f90
flang/test/Lower/Intrinsics/acos.f90
flang/test/Lower/Intrinsics/acosh.f90
flang/test/Lower/Intrinsics/adjustl.f90
flang/test/Lower/Intrinsics/adjustr.f90
flang/test/Lower/Intrinsics/aint.f90
flang/test/Lower/Intrinsics/all.f90
flang/test/Lower/Intrinsics/any.f90
flang/test/Lower/Intrinsics/asin.f90
flang/test/Lower/Intrinsics/asinh.f90
flang/test/Lower/Intrinsics/associated.f90
flang/test/Lower/Intrinsics/atanh.f90
flang/test/Lower/Intrinsics/bessel_j0.f90
flang/test/Lower/Intrinsics/bessel_j1.f90
flang/test/Lower/Intrinsics/bessel_jn.f90
flang/test/Lower/Intrinsics/bessel_y0.f90
flang/test/Lower/Intrinsics/bessel_y1.f90
flang/test/Lower/Intrinsics/bessel_yn.f90
flang/test/Lower/Intrinsics/cmplx.f90
flang/test/Lower/Intrinsics/command_argument_count.f90
flang/test/Lower/Intrinsics/count.f90
flang/test/Lower/Intrinsics/cpu_time.f90
flang/test/Lower/Intrinsics/date_and_time.f90
flang/test/Lower/Intrinsics/dconjg.f90
flang/test/Lower/Intrinsics/dim.f90
flang/test/Lower/Intrinsics/dot_product.f90
flang/test/Lower/Intrinsics/eoshift.f90
flang/test/Lower/Intrinsics/erfc.f90
flang/test/Lower/Intrinsics/exit-2.f90
flang/test/Lower/Intrinsics/exit.f90
flang/test/Lower/Intrinsics/exp.f90
flang/test/Lower/Intrinsics/exponent.f90
flang/test/Lower/Intrinsics/fraction.f90
flang/test/Lower/Intrinsics/gamma.f90
flang/test/Lower/Intrinsics/get_command_argument-optional.f90
flang/test/Lower/Intrinsics/get_command_argument.f90
flang/test/Lower/Intrinsics/get_environment_variable-optional.f90
flang/test/Lower/Intrinsics/get_environment_variable.f90
flang/test/Lower/Intrinsics/iall.f90
flang/test/Lower/Intrinsics/iand.f90
flang/test/Lower/Intrinsics/iany.f90
flang/test/Lower/Intrinsics/ieee_is_finite.f90
flang/test/Lower/Intrinsics/ieee_operator_eq.f90
flang/test/Lower/Intrinsics/index.f90
flang/test/Lower/Intrinsics/iparity.f90
flang/test/Lower/Intrinsics/lbound.f90
flang/test/Lower/Intrinsics/log.f90
flang/test/Lower/Intrinsics/log_gamma.f90
flang/test/Lower/Intrinsics/matmul.f90
flang/test/Lower/Intrinsics/max.f90
flang/test/Lower/Intrinsics/maxloc.f90
flang/test/Lower/Intrinsics/maxval.f90
flang/test/Lower/Intrinsics/merge.f90
flang/test/Lower/Intrinsics/minloc.f90
flang/test/Lower/Intrinsics/minval.f90
flang/test/Lower/Intrinsics/mod.f90
flang/test/Lower/Intrinsics/modulo.f90
flang/test/Lower/Intrinsics/nearest.f90
flang/test/Lower/Intrinsics/pack.f90
flang/test/Lower/Intrinsics/parity.f90
flang/test/Lower/Intrinsics/product.f90
flang/test/Lower/Intrinsics/random.f90
flang/test/Lower/Intrinsics/repeat.f90
flang/test/Lower/Intrinsics/reshape.f90
flang/test/Lower/Intrinsics/rrspacing.f90
flang/test/Lower/Intrinsics/scale.f90
flang/test/Lower/Intrinsics/scan.f90
flang/test/Lower/Intrinsics/selected_int_kind.f90
flang/test/Lower/Intrinsics/selected_real_kind.f90
flang/test/Lower/Intrinsics/set_exponent.f90
flang/test/Lower/Intrinsics/size.f90
flang/test/Lower/Intrinsics/spacing.f90
flang/test/Lower/Intrinsics/spread.f90
flang/test/Lower/Intrinsics/sum.f90
flang/test/Lower/Intrinsics/system_clock.f90
flang/test/Lower/Intrinsics/transfer.f90
flang/test/Lower/Intrinsics/transpose.f90
flang/test/Lower/Intrinsics/transpose_opt.f90
flang/test/Lower/Intrinsics/trim.f90
flang/test/Lower/Intrinsics/ubound.f90
flang/test/Lower/Intrinsics/ubound01.f90
flang/test/Lower/Intrinsics/verify.f90
flang/test/Lower/OpenMP/copyin.f90
flang/test/Lower/OpenMP/master.f90
flang/test/Lower/OpenMP/omp-parallel-firstprivate-clause-scalar.f90
flang/test/Lower/OpenMP/omp-parallel-lastprivate-clause-scalar.f90
flang/test/Lower/OpenMP/omp-parallel-wsloop-firstpriv.f90
flang/test/Lower/OpenMP/omp-parallel-wsloop.f90
flang/test/Lower/OpenMP/omp-wsloop-chunks.f90
flang/test/Lower/OpenMP/omp-wsloop-monotonic.f90
flang/test/Lower/OpenMP/omp-wsloop-nonmonotonic.f90
flang/test/Lower/OpenMP/omp-wsloop-simd.f90
flang/test/Lower/OpenMP/omp-wsloop.f90
flang/test/Lower/OpenMP/sections.f90
flang/test/Lower/OpenMP/simd.f90
flang/test/Lower/OpenMP/single.f90
flang/test/Lower/OpenMP/task.f90
flang/test/Lower/OpenMP/taskgroup.f90
flang/test/Lower/OpenMP/taskwait.f90
flang/test/Lower/OpenMP/taskyield.f90
flang/test/Lower/OpenMP/threadprivate-use-association-2.f90
flang/test/Lower/OpenMP/wsloop-reduction-add.f90
flang/test/Lower/OpenMP/wsloop-reduction-mul.f90
flang/test/Lower/allocatable-assignment.f90
flang/test/Lower/allocatable-callee.f90
flang/test/Lower/allocatable-caller.f90
flang/test/Lower/allocatable-polymorphic.f90
flang/test/Lower/allocatable-runtime.f90
flang/test/Lower/array-character.f90
flang/test/Lower/array-constructor-2.f90
flang/test/Lower/array-derived-assignments.f90
flang/test/Lower/array-elemental-calls-2.f90
flang/test/Lower/array-elemental-calls-char-byval.f90
flang/test/Lower/array-elemental-calls-char.f90
flang/test/Lower/array-elemental-calls.f90
flang/test/Lower/array-elemental-subroutines.f90
flang/test/Lower/array-expression-slice-1.f90
flang/test/Lower/array-expression.f90
flang/test/Lower/array-substring.f90
flang/test/Lower/array-temp.f90
flang/test/Lower/array-user-def-assignments.f90
flang/test/Lower/assignment.f90
flang/test/Lower/associate-construct-2.f90
flang/test/Lower/assumed-shape-callee.f90
flang/test/Lower/assumed-shape-caller.f90
flang/test/Lower/basic-call.f90
flang/test/Lower/big-integer-parameter.f90
flang/test/Lower/c-interoperability-c-pointer.f90
flang/test/Lower/call-by-value-attr.f90
flang/test/Lower/call-by-value.f90
flang/test/Lower/call-copy-in-out.f90
flang/test/Lower/call-implicit.f90
flang/test/Lower/call-parenthesized-arg.f90
flang/test/Lower/call-suspect.f90
flang/test/Lower/call.f90
flang/test/Lower/character-assignment.f90
flang/test/Lower/character-concatenation.f90
flang/test/Lower/character-elemental.f90
flang/test/Lower/character-local-variables.f90
flang/test/Lower/character-substrings.f90
flang/test/Lower/components.f90
flang/test/Lower/default-initialization.f90
flang/test/Lower/derived-allocatable-components.f90
flang/test/Lower/derived-assignments.f90
flang/test/Lower/derived-pointer-components.f90
flang/test/Lower/derived-type-temp.f90
flang/test/Lower/derived-types.f90
flang/test/Lower/dispatch.f90
flang/test/Lower/do_loop.f90
flang/test/Lower/dummy-argument-assumed-shape-optional.f90
flang/test/Lower/dummy-argument-contiguous.f90
flang/test/Lower/dummy-argument-optional-2.f90
flang/test/Lower/dummy-argument-optional.f90
flang/test/Lower/dummy-arguments.f90
flang/test/Lower/dummy-procedure-character.f90
flang/test/Lower/dummy-procedure-in-entry.f90
flang/test/Lower/dummy-procedure.f90
flang/test/Lower/entry-statement.f90
flang/test/Lower/equivalence-2.f90
flang/test/Lower/explicit-interface-results-2.f90
flang/test/Lower/explicit-interface-results.f90
flang/test/Lower/ext-proc-as-actual-argument-1.f90
flang/test/Lower/ext-proc-as-actual-argument-2.f90
flang/test/Lower/fail_image.f90
flang/test/Lower/fast-math-arithmetic.f90
flang/test/Lower/forall/array-constructor.f90
flang/test/Lower/forall/forall-2.f90
flang/test/Lower/forall/forall-allocatable-2.f90
flang/test/Lower/forall/forall-construct-2.f90
flang/test/Lower/forall/forall-construct-3.f90
flang/test/Lower/forall/forall-construct.f90
flang/test/Lower/forall/forall-ranked.f90
flang/test/Lower/forall/forall-slice.f90
flang/test/Lower/forall/forall-where.f90
flang/test/Lower/forall/scalar-substring.f90
flang/test/Lower/forall/test9.f90
flang/test/Lower/goto-statement.f90
flang/test/Lower/host-associated-functions.f90
flang/test/Lower/host-associated.f90
flang/test/Lower/implicit-interface.f90
flang/test/Lower/intentout-deallocate.f90
flang/test/Lower/io-char-array.f90
flang/test/Lower/io-item-list.f90
flang/test/Lower/io-statement-1.f90
flang/test/Lower/io-statement-2.f90
flang/test/Lower/io-statement-3.f90
flang/test/Lower/io-statement-big-unit-checks.f90
flang/test/Lower/io-statement-clean-ups.f90
flang/test/Lower/io-statement-open-options.f90
flang/test/Lower/io-write.f90
flang/test/Lower/logical-as-fortran.f90
flang/test/Lower/loops2.f90
flang/test/Lower/math-lowering.f90
flang/test/Lower/mixed_loops.f90
flang/test/Lower/namelist.f90
flang/test/Lower/nested-where.f90
flang/test/Lower/non-standard-extensions.f90
flang/test/Lower/nullify-polymorphic.f90
flang/test/Lower/optional-value-caller.f90
flang/test/Lower/parent-component.f90
flang/test/Lower/pointer-args-caller.f90
flang/test/Lower/pointer-references.f90
flang/test/Lower/pointer-results-as-arguments.f90
flang/test/Lower/polymorphic-types.f90
flang/test/Lower/polymorphic.f90
flang/test/Lower/procedure-declarations.f90
flang/test/Lower/program-units-fir-mangling.f90
flang/test/Lower/real-operations-1.f90
flang/test/Lower/real-operations-2.f90
flang/test/Lower/select-type.f90
flang/test/Lower/statement-function.f90
flang/test/Lower/stop-statement.f90
flang/test/Lower/structure-constructors.f90
flang/test/Lower/transformational-intrinsics.f90
flang/test/Lower/variable-inquiries.f90
flang/test/Lower/vector-subscript-io.f90
flang/test/Lower/where.f90
flang/test/Lower/while_loop.f90