[llvm] [AMDGPU] Swap select operands to allow later v_cndmask shrinking into vop2 (PR #142354)

Jay Foad via llvm-commits llvm-commits at lists.llvm.org
Mon Jun 9 08:32:17 PDT 2025


jayfoad wrote:

> One of the problems with this version is that this check is called for each select instruction, checking ALL selects every time. In the previous version the check was done only once when looking at compare instruction : #142140

Agreed, that makes the current version pretty confusing. Maybe the best of both worlds would be to write it as a DAGCombine that vists the SETCC node instead of the SELECT?

https://github.com/llvm/llvm-project/pull/142354


More information about the llvm-commits mailing list