[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:14:34 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
----------------
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.


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