llvm-project
482a7718 - [DAG] visitCLMUL - fold (clmul x, c_pow2) -> (shl x, log2(c_pow2)) (#184049)

Commit
4 days ago
[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
Author
Parents
Loading