[llvm] [GlobalISel] Add G_ABDS and G_ABDU instructions (PR #118122)

Thorsten Schütt via llvm-commits llvm-commits at lists.llvm.org
Sat Nov 30 01:43:29 PST 2024


tschuett wrote:

X86 lowers them sometimes into selects. We could add the reverse combine:
// abds(lhs, rhs) -> select(slt(lhs,rhs),sub(rhs,lhs),sub(lhs,rhs))
// abdu(lhs, rhs) -> select(ult(lhs,rhs),sub(rhs,lhs),sub(lhs,rhs))

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


More information about the llvm-commits mailing list