[all-commits] [llvm/llvm-project] e964ac: [DAG] Fold mismatched widened avg idioms to narrow...
Lauren via All-commits
all-commits at lists.llvm.org
Mon Oct 27 05:25:04 PDT 2025
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: e964acf85f6d964fe5a1996289f34759cceeca3f
https://github.com/llvm/llvm-project/commit/e964acf85f6d964fe5a1996289f34759cceeca3f
Author: Lauren <38364197+laurenmchin at users.noreply.github.com>
Date: 2025-10-27 (Mon, 27 Oct 2025)
Changed paths:
M llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
M llvm/test/CodeGen/AArch64/arm64-vhadd.ll
Log Message:
-----------
[DAG] Fold mismatched widened avg idioms to narrow form (#147946) (#163366)
[DAG] Fold mismatched widened avg idioms to narrow form (fixes half of
[llvm#147946](https://github.com/llvm/llvm-project/issues/147946))
1. `trunc(avgceilu(sext(x), sext(y))) -> avgceils(x, y)`
2. `trunc(avgceils(zext(x), zext(y))) -> avgceilu(x, y)`
When inputs are sign-extended, unsigned and signed averaging operations
produce identical results after truncation, allowing us to use the
semantically correct narrow operation.
alive2: https://alive2.llvm.org/ce/z/ZRbfHT
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