[PATCH] D53157: Teach the IRBuilder about constrained fadd and friends

Kevin P. Neal via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Jul 3 10:24:41 PDT 2019


kpn marked 2 inline comments as done.
kpn added inline comments.


================
Comment at: include/llvm/IR/IRBuilder.h:1324
+      return CreateConstrainedFPBinOp(Intrinsic::experimental_constrained_fadd,
+                                      L, R, nullptr, Name);
+
----------------
rjmccall wrote:
> kpn wrote:
> > rjmccall wrote:
> > > `FPMD` is dropped in this case; I don't know if that's intentional.
> > You can see that I'm on the fence here. I'm not sure that mixing fast math with constrained math makes sense. So CreateConstrainedFPBinOp() can take an instruction for copying fast math flags, but it doesn't do anything with this instruction. And the FPMD is simply dropped in the non-*FMF() methods.
> > 
> > If we do decide later to support mixing constrained and fast math then we won't have to change any APIs. Until then it takes the conservative route and drops the info.
> Okay.  That should probably be mentioned, at least in the documentation for `CreateConstrainedFPBinOp`.  Should you make an overload of the latter which takes an `MDNode*` as the final argument, for parallelism/completeness?
I made one function that takes both. Patch coming in a minute.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D53157/new/

https://reviews.llvm.org/D53157





More information about the cfe-commits mailing list