[all-commits] [llvm/llvm-project] cd75a7: [SelectionDAG] Fix missed optimization for CLMUL w...
Jan Schultke via All-commits
all-commits at lists.llvm.org
Wed Jun 3 09:21:07 PDT 2026
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: cd75a7db92289d9784b471b27cd72cb50a2352fd
https://github.com/llvm/llvm-project/commit/cd75a7db92289d9784b471b27cd72cb50a2352fd
Author: Jan Schultke <me at eisenwave.net>
Date: 2026-06-03 (Wed, 03 Jun 2026)
Changed paths:
M llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp
M llvm/test/CodeGen/X86/clmul-vector.ll
M llvm/test/CodeGen/X86/clmul.ll
Log Message:
-----------
[SelectionDAG] Fix missed optimization for CLMUL where one operand is all ones (#200592)
Fixes #200556
This special case is equivalent to a "parallel prefix XOR" or "bitwise
parity" operation, which can be expanded to a logarithmic amount of
bitwise operations instead of a linear amount (relative to the bit
width). When other bitwise operations such as BDEP and BEXT are
expanded, they rely on that operation being lowered to a CLMUL directly
or expanded to this efficient form.
See also
- #200570 (this PR needs this fix to have good codegen)
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