-
Notifications
You must be signed in to change notification settings - Fork 15.2k
Open
Labels
backend:AArch64good first issuehttps://github.com/llvm/llvm-project/contributehttps://github.com/llvm/llvm-project/contributellvm:globaliselmissed-optimization
Description
SDAG, via these nodes can pattern-recognise and optimise abd nodes. We should add the same operations for global isel.
/// ABDS/ABDU - Absolute difference - Return the absolute difference between
/// two numbers interpreted as signed/unsigned.
/// i.e trunc(abs(sext(Op0) - sext(Op1))) becomes abds(Op0, Op1)
/// or trunc(abs(zext(Op0) - zext(Op1))) becomes abdu(Op0, Op1)
ABDS,
ABDU,
There are tests in, for example, llvm/test/CodeGen/AArch64/abd-combine.ll.
https://godbolt.org/z/71PGjf486
Metadata
Metadata
Assignees
Labels
backend:AArch64good first issuehttps://github.com/llvm/llvm-project/contributehttps://github.com/llvm/llvm-project/contributellvm:globaliselmissed-optimization