[llvm] [DAG] Fold (and X, (bswap/bitreverse (not Y))) -> (and X, (not (bswap/bitreverse Y))) on ANDNOT capable targets (PR #112547)

via llvm-commits llvm-commits at lists.llvm.org
Fri Oct 18 10:38:20 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
----------------
goldsteinn wrote:

Is this equivilent?

https://github.com/llvm/llvm-project/pull/112547


More information about the llvm-commits mailing list