[all-commits] [llvm/llvm-project] 28d071: [DAGCombiner] Add combine avg from shifts (#113909)
dnsampaio via All-commits
all-commits at lists.llvm.org
Thu Oct 31 02:57:48 PDT 2024
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 28d071803387b6b5c2ba6bc8321aa8e35168167a
https://github.com/llvm/llvm-project/commit/28d071803387b6b5c2ba6bc8321aa8e35168167a
Author: dnsampaio <dnsampaio at gmail.com>
Date: 2024-10-31 (Thu, 31 Oct 2024)
Changed paths:
M llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
M llvm/lib/Target/ARM/ARMISelLowering.cpp
M llvm/lib/Target/ARM/ARMInstrMVE.td
M llvm/test/CodeGen/AArch64/avg.ll
M llvm/test/CodeGen/AArch64/sve-hadd.ll
Log Message:
-----------
[DAGCombiner] Add combine avg from shifts (#113909)
This teaches dagcombiner to fold:
`(asr (add nsw x, y), 1) -> (avgfloors x, y)`
`(lsr (add nuw x, y), 1) -> (avgflooru x, y)`
as well the combine them to a ceil variant:
`(avgfloors (add nsw x, y), 1) -> (avgceils x, y)`
`(avgflooru (add nuw x, y), 1) -> (avgceilu x, y)`
iff valid for the target.
Removes some of the ARM MVE patterns that are now dead code.
It adds the avg opcodes to `IsQRMVEInstruction` as to preserve the
immediate splatting as before.
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list