[all-commits] [llvm/llvm-project] 482a77: [DAG] visitCLMUL - fold (clmul x, c_pow2) -> (shl ...
fbrv via All-commits
all-commits at lists.llvm.org
Mon Mar 2 02:53:13 PST 2026
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 482a7718a8d8376b56e9dad7432624c1491ee1e6
https://github.com/llvm/llvm-project/commit/482a7718a8d8376b56e9dad7432624c1491ee1e6
Author: fbrv <Fabio.Baravalle at gmail.com>
Date: 2026-03-02 (Mon, 02 Mar 2026)
Changed paths:
M llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
M llvm/test/CodeGen/RISCV/combine-clmul.ll
M llvm/test/CodeGen/X86/combine-clmul.ll
Log Message:
-----------
[DAG] visitCLMUL - fold (clmul x, c_pow2) -> (shl x, log2(c_pow2)) (#184049)
Implements the missing basic folds for `ISD::CLMUL` in `visitCLMUL`:
- `(clmul x, 1)` → `x`
- `(clmul x, c_pow2)` → `(shl x, log2(c_pow2))`
These were previously only folded during scalar expansion
(`expandCLMUL`), so targets with native CLMUL support (e.g. X86 pclmul,
RISCV Zbc) never had the opportunity to simplify these cases.
Fixes #181831
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