[all-commits] [llvm/llvm-project] e26ec3: [DAG][AArch64][ARM] Combine abd(sub(x, y)) to abd ...
David Green via All-commits
all-commits at lists.llvm.org
Wed Jan 18 02:11:07 PST 2023
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: e26ec330c4ff26c4f51e1bac4669b57c0edb5d3e
https://github.com/llvm/llvm-project/commit/e26ec330c4ff26c4f51e1bac4669b57c0edb5d3e
Author: David Green <david.green at arm.com>
Date: 2023-01-18 (Wed, 18 Jan 2023)
Changed paths:
M llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
M llvm/test/CodeGen/AArch64/neon-abd.ll
Log Message:
-----------
[DAG][AArch64][ARM] Combine abd(sub(x, y)) to abd if the sub is nsw
This implements the fold (abs (sub nsw x, y)) -> abds(x, y). Providing
the sub is nsw this appears to be valid without the extensions that are
usually used for abds. https://alive2.llvm.org/ce/z/XHVaB3. The
equivalent abdu combine seems to not be valid.
Differential Revision: https://reviews.llvm.org/D141665
More information about the All-commits
mailing list