[PATCH] D158908: AMDGPU: Turn pow libcalls into powr
Matt Arsenault via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Aug 28 08:03:23 PDT 2023
arsenm added inline comments.
================
Comment at: llvm/lib/Target/AMDGPU/AMDGPULibCalls.cpp:855
+ // TODO: Pass all arguments to cannotBeOrderedLessThanZero
+ if (PowrFunc && cannotBeOrderedLessThanZero(opr0, M->getDataLayout())) {
+ cast<CallInst>(FPOp)->setCalledFunction(PowrFunc);
----------------
rampitec wrote:
> Can you check the value before inserting declaration? Just to avoid unused declarations. Plus the way it is now you may return false when you have actually modified the module.
Nothing else in the pass bothers trying to avoid declarations, globaldce is going to run after anyway. Plus it's quite possibly more expensive to do the recursive value check than to just insert and delete the unused declaration later
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D158908/new/
https://reviews.llvm.org/D158908
More information about the llvm-commits
mailing list