[llvm] [DAG] Fold (and X, (bswap/bitreverse (not Y))) -> (and X, (not (bswap/bitreverse Y))) on ANDNOT capable targets (PR #112547)
Simon Pilgrim via llvm-commits
llvm-commits at lists.llvm.org
Fri Oct 25 10:13:41 PDT 2024
================
@@ -529,8 +815,7 @@ define i32 @andnot_bitreverse_i32(i32 %a0, i32 %a1) nounwind {
define i16 @andnot_bitreverse_i16(i16 %a0, i16 %a1) nounwind {
; X86-LABEL: andnot_bitreverse_i16:
; X86: # %bb.0:
-; X86-NEXT: movl {{[0-9]+}}(%esp), %eax
-; X86-NEXT: notl %eax
+; X86-NEXT: movzwl {{[0-9]+}}(%esp), %eax
----------------
RKSimon wrote:
yes - we only care about this lower 16-bits but arg passing allows us to dereference 32-bits
https://github.com/llvm/llvm-project/pull/112547
More information about the llvm-commits
mailing list