[PATCH] D101209: [PowerPC] Provide fastmath sqrt and div functions in altivec.h

2021-04-30 Thread Nemanja Ivanovic via Phabricator via cfe-commits
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

[PATCH] D101209: [PowerPC] Provide fastmath sqrt and div functions in altivec.h

2021-04-29 Thread Bardia Mahjour via Phabricator via cfe-commits
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 ___

[PATCH] D101209: [PowerPC] Provide fastmath sqrt and div functions in altivec.h

2021-04-29 Thread Nemanja Ivanovic via Phabricator via cfe-commits
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

[PATCH] D101209: [PowerPC] Provide fastmath sqrt and div functions in altivec.h

2021-04-28 Thread Nemanja Ivanovic via Phabricator via cfe-commits
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

[PATCH] D101209: [PowerPC] Provide fastmath sqrt and div functions in altivec.h

2021-04-28 Thread Bardia Mahjour via Phabricator via cfe-commits
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"); +

[PATCH] D101209: [PowerPC] Provide fastmath sqrt and div functions in altivec.h

2021-04-26 Thread Nemanja Ivanovic via Phabricator via cfe-commits
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

[PATCH] D101209: [PowerPC] Provide fastmath sqrt and div functions in altivec.h

2021-04-25 Thread Qiu Chaofan via Phabricator via cfe-commits
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

[PATCH] D101209: [PowerPC] Provide fastmath sqrt and div functions in altivec.h

2021-04-23 Thread Nemanja Ivanovic via Phabricator via cfe-commits
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