[PATCH] D104479: [PartiallyInlineLibCalls] Disable sqrt expansion for strictfp.

Craig Topper via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jun 17 13:15:42 PDT 2021


craig.topper added inline comments.


================
Comment at: llvm/test/Transforms/PartiallyInlineLibCalls/strictfp.ll:8
+; CHECK-NOT: call{{.*}}@sqrtf
+  %res = tail call float @sqrtf(float %val) strictfp
+  ret float %res
----------------
craig.topper wrote:
> kpn wrote:
> > craig.topper wrote:
> > > kpn wrote:
> > > > There is a constrained sqrt. It seems like not emitting it is the real bug.
> > > From the frontend?
> > A quick check shows that we actually are emitting the constrained sqrt call from clang, at least we are using the arguments from the godbolt link. So I'm not sure how we got here?
> We can only emit an intrinsic call if -fno-math-errno is in effect. If we need errno, we must call the library function.
The goal of this pass is to fast path the handling of sane inputs that aren't an error condition and fall back to libcall to get errno updated if we detect a bad input.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D104479



More information about the llvm-commits mailing list