[PATCH] Allow constant folding of fma and fmuladd

hfinkel at anl.gov hfinkel at anl.gov
Tue Mar 4 15:31:30 PST 2014



================
Comment at: lib/Analysis/ConstantFolding.cpp:1640
@@ +1639,3 @@
+        default: break;
+#if HAVE_FMA
+        case Intrinsic::fma:
----------------
I'm confused as to why you're doing this? Can't APFloat compute the FMA properly regardless of the host capabilities?

Furthermore, if you do it this way, it looks like the answer might be wrong depending on how the compiler was configured?


http://llvm-reviews.chandlerc.com/D2951



More information about the llvm-commits mailing list