[PATCH] D26602: [DAGCombiner] do not fold (fmul (fadd X, 1), Y) -> (fmad X, Y, Y) by default

Sanjay Patel via llvm-commits llvm-commits at lists.llvm.org
Mon Nov 14 08:21:55 PST 2016


spatel added a comment.

Please correct me if I'm not understanding, but I think we have to answer: what is the expected behavior if someone uses -fassociative-math and -fno-finite-math-only together?

[I'm purposely using the clang flags here because the implementation just gets muddier/broken as we proceed down to the DAG between IR FMF/SDNodeFlags vs. target options vs. function-level attributes. Never mind that the clang flags may not work as intended ( https://llvm.org/bugs/show_bug.cgi?id=27372 )]

So what does it mean if the user told us to do reassociation transforms but also told us that we should respect INF/NAN?

As this patch is written, the respect for INF/NAN should override the ability to reassociate?


https://reviews.llvm.org/D26602





More information about the llvm-commits mailing list