[PATCH] D28448: InstCombine: Do unsafe math combine of fadd + fmuladd + fmul

Hal Finkel via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Feb 10 10:14:30 PST 2017


hfinkel added a comment.

Under what circumstances do we create a 'fast' fmuladd. Maybe we should canonicalize a 'fast' fmuladd into a 'fast' mul and a 'fast' add instead?



================
Comment at: lib/Transforms/InstCombine/InstCombineAddSub.cpp:434
+  if (IntrinsicInst *II0 = dyn_cast<IntrinsicInst>(I0)) {
+    // (fadd (fmuladd x, y, (fmul u, v), z) -> (fmuladd x, y (fmuladd u, v, z))
+    //
----------------
You're missing a closing ) in the first expression.


================
Comment at: test/Transforms/InstCombine/fmuladd-opt.ll:2
+; RUN: opt -S -instcombine < %s | FileCheck %s
+; (fadd (fma x, y, (fmul u, v), z) -> (fma x, y (fma u, v, z))
+
----------------
Missing closing ) here too.


https://reviews.llvm.org/D28448





More information about the llvm-commits mailing list