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

Hal Finkel via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Nov 7 09:18:58 PST 2018


hfinkel added a comment.

In https://reviews.llvm.org/D53157#1290266, @kpn wrote:

> In https://reviews.llvm.org/D53157#1290248, @cameron.mcinally wrote:
>
> > Adding the usual suspects: @andrew.w.kaylor @craig.topper @uweigand @hfinkel
> >
> > I don't see the benefit of this change. The intrinsics are good enough to be functional right now (minus a few that are in progress), so I'm not sure we need IRBuilder functions. Am I missing something?
>
>
> The IRBuilder is used in clang. Once the use of the pragma is wired down to clang's codegen we need a way to emit the constrained intrinsics. It makes for very readable code to change a call to Builder.CreateFAdd() so it conditionally calls Builder.CreateConstrainedFAdd() instead. And if CreateConstrainedFAdd() returns something other than a call to an intrinsic then clang doesn't care.


Exactly. We'll want this for Clang CodeGen, etc.


https://reviews.llvm.org/D53157





More information about the llvm-commits mailing list