[PATCH] D28675: [DAGCombine] require UnsafeFPMath for re-association of addition
Mehdi AMINI via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Jan 16 16:18:46 PST 2017
mehdi_amini added a comment.
In https://reviews.llvm.org/D28675#647670, @arsenm wrote:
> In https://reviews.llvm.org/D28675#645325, @hfinkel wrote:
> > In https://reviews.llvm.org/D28675#645313, @mehdi_amini wrote:
> > > What about individual FMF?
> > I agree; these transforms rely on the associativity of addition. As Mehdi says, you should check the FMFs on the individual instructions.
> This would be nice, but it seems right now you can only use FMF flags with a fixed set of binary nodes, so no FMA/FMAD
That's not great, looks like something that should be lifted, otherwise folding (fast add (fast mul (x, y), z) to FMA is losing the fast-math information and inhibiting potential further combine.
More information about the llvm-commits