This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rGc3da07d216dd: [PowerPC] Provide fastmath sqrt and div
functions in altivec.h (authored by nemanjai).
Repository:
rG LLVM Github Monorepo
CHANGES
bmahjour accepted this revision.
bmahjour added a comment.
This revision is now accepted and ready to land.
LGTM
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D101209/new/
https://reviews.llvm.org/D101209
___
nemanjai updated this revision to Diff 341456.
nemanjai added a comment.
Changed `rsqrt` to be an actual reciprocal rather than just a refined `sqrt`
estimate.
I have verified that the code generated is equivalent to gcc's and the results
produced are the same.
Repository:
rG LLVM Github Mo
nemanjai added inline comments.
Comment at: clang/lib/CodeGen/CGBuiltin.cpp:15130
+ Value *Y = EmitScalarExpr(E->getArg(1));
+ auto Ret = Builder.CreateFDiv(X, Y, "recipdiv");
+ Builder.setFastMathFlags(FMF);
bmahjour wrote:
> I wonder if we can do
bmahjour requested changes to this revision.
bmahjour added inline comments.
This revision now requires changes to proceed.
Comment at: clang/lib/CodeGen/CGBuiltin.cpp:15130
+ Value *Y = EmitScalarExpr(E->getArg(1));
+ auto Ret = Builder.CreateFDiv(X, Y, "recipdiv");
+
nemanjai added inline comments.
Comment at: clang/lib/CodeGen/CGBuiltin.cpp:15122
+ case PPC::BI__builtin_ppc_rsqrtd: {
+auto FMF = Builder.getFastMathFlags();
+Builder.getFastMathFlags().setFast();
qiucf wrote:
> Seems FMF will be automatically restored
qiucf added inline comments.
Comment at: clang/lib/CodeGen/CGBuiltin.cpp:15122
+ case PPC::BI__builtin_ppc_rsqrtd: {
+auto FMF = Builder.getFastMathFlags();
+Builder.getFastMathFlags().setFast();
Seems FMF will be automatically restored without the three
nemanjai created this revision.
nemanjai added reviewers: cebowleratibm, bmahjour, PowerPC.
Herald added subscribers: shchenz, kbarton.
nemanjai requested review of this revision.
Herald added a project: clang.
This adds the long overdue implementations of these functions that have been
part of t