[llvm] [AMDGPU] Omit umin on ctlz/cttz if operand is non-zero. (PR #79127)
Matt Arsenault via llvm-commits
llvm-commits at lists.llvm.org
Tue May 7 07:53:07 PDT 2024
arsenm wrote:
> > Instead of doing this during the lowering, should the combine on CTLZ/CTTZ transform the non-undef version into the undef version if the input is known non-zero? I thought it was already doing that (it is https://github.com/llvm/llvm-project/blob/9731b77e80261c627d79980f8c275700bdaf6591/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp#L11005C6-L11005C7)
>
> It must be missing some cases. Otherwise the tests wouldn't change.
Yes, so should debug why that happened. We shouldn't need to reinvent optimizations during the lowering
https://github.com/llvm/llvm-project/pull/79127
More information about the llvm-commits
mailing list