[PATCH] DAGCombine: constant fold FMA

hfinkel at anl.gov hfinkel at anl.gov
Tue Jan 13 16:43:17 PST 2015

Unfortunately, this won't work either. You can't modify getNode so that it will *fail* to return a node that you might want to constant-fold later. This will cause all kinds of problems.

Does your target want to combine these things because it is essentially operating in a 'fast math' mode, do you not support floating-point exception tracking, or is something else going on?

FWIW, I think your target could always install a target-specific DAG combine handler for ISD::FMA and fold them itself. Once we have fast-math flags at the SDAG level, we can also support this (perhaps).



More information about the llvm-commits mailing list