[llvm] [X86] Prefer sub-of-not for vector inc-of-add (PR #207695)

via llvm-commits llvm-commits at lists.llvm.org
Sat Aug 29 04:09:56 PDT 2026


================
@@ -101,9 +101,10 @@ define i64 @scalar_i64(i64 %x, i64 %y) nounwind {
 define <16 x i8> @vector_i128_i8(<16 x i8> %x, <16 x i8> %y) nounwind {
 ; ALL-LABEL: vector_i128_i8:
 ; ALL:       # %bb.0:
-; ALL-NEXT:    paddb %xmm1, %xmm0
-; ALL-NEXT:    pcmpeqd %xmm1, %xmm1
-; ALL-NEXT:    psubb %xmm1, %xmm0
+; ALL-NEXT:    pcmpeqd %xmm2, %xmm2
+; ALL-NEXT:    pxor %xmm0, %xmm2
+; ALL-NEXT:    psubb %xmm2, %xmm1
+; ALL-NEXT:    movdqa %xmm1, %xmm0
----------------
Andarwinux wrote:

If it won't cause any new regressions, I think it's acceptable.

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


More information about the llvm-commits mailing list