[Reassociate] Enable FP reassociation via 'reassoc' and 'nsz'
authorWarren Ristow <warren.ristow@sony.com>
Fri, 15 Jul 2022 18:44:35 +0000 (11:44 -0700)
committerWarren Ristow <warren.ristow@sony.com>
Fri, 15 Jul 2022 18:44:35 +0000 (11:44 -0700)
commitc6507930493bf57d88bcb1f7d83da1b3c08ab02a
tree0ba169b4b11bedd8e55d8d347b1eba68216b29a1
parentd767b392d0697c8c8e31f2bf6e40f8c2b72c057d
[Reassociate] Enable FP reassociation via 'reassoc' and 'nsz'

Compiling with '-ffast-math' tuns on all the FastMathFlags (FMF), as
expected, and that enables FP reassociation. Only the two FMF flags
'reassoc' and 'nsz' are technically required to perform reassociation,
but disabling other unrelated FMF bits is needlessly suppressing the
optimization.

This patch fixes that needless suppression, and makes appropriate
adjustments to test-cases, fixing some outstanding TODOs in the process.

Fixes: #56483

Reviewed By: spatel

Differential Revision: https://reviews.llvm.org/D129523
llvm/lib/Transforms/Scalar/Reassociate.cpp
llvm/test/Transforms/PhaseOrdering/fast-basictest.ll
llvm/test/Transforms/Reassociate/fast-basictest.ll