[PATCH] D150347: [AMDGPU] Improve abs modifier usage
Jay Foad via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri May 12 06:24:20 PDT 2023
foad added inline comments.
================
Comment at: llvm/lib/Target/AMDGPU/AMDGPULateCodeGenPrepare.cpp:223-225
+ // Early opt-out as we don't want to operate on undef or poison values.
+ if (Intrinsic && hasUndefOrPoisonOperand(*Intrinsic))
+ return false;
----------------
tsymalla wrote:
> foad wrote:
> > Why do you need this special case at all? And why only for intrinsics?
> We don't really need to handle it, but it is useless to clone (for instance) an fabs call with an undef operand.
Any useless case should have been optimized away already, so it is much cleaner if you do not add code to handle it specially here.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D150347/new/
https://reviews.llvm.org/D150347
More information about the llvm-commits
mailing list