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

Kevin P. Neal via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Nov 7 08:30:31 PST 2018


kpn added a comment.

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.


https://reviews.llvm.org/D53157





More information about the llvm-commits mailing list