[PATCH] D36335: Add ‘llvm.experimental.constrained.fma‘ Intrinsic

Brian Sumner via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Aug 4 14:29:50 PDT 2017


b-sumner added inline comments.


================
Comment at: lib/CodeGen/SelectionDAG/SelectionDAG.cpp:6651
   case ISD::STRICT_FREM: NewOpc = ISD::FREM; break;
+  case ISD::STRICT_FMA: NewOpc = ISD::FMA; break;
   case ISD::STRICT_FSQRT: NewOpc = ISD::FSQRT; IsUnary = true; break;
----------------
wdng wrote:
> b-sumner wrote:
> > This is a ternary operation.  Code below assumes unary or binary.
> In Intrinsics.td, we have defined fma is a ternary operator. Here it only mutates STRICT_FMA to FMA and IsUnary is false by default. So we may not need to specify whether is unary of binary here?
Please take a look at lines 6676 - 6680 below.  Do you not need to pass a 3 element list to MorphNodeTo for the FMA case?


Repository:
  rL LLVM

https://reviews.llvm.org/D36335





More information about the llvm-commits mailing list