[llvm] [X86] SimplifyDemandedBitsForTargetNode - PCMPGT(0,X) only demands the signbit of X (PR #163981)

Phoebe Wang via llvm-commits llvm-commits at lists.llvm.org
Sat Oct 18 00:02:07 PDT 2025


================
@@ -60,7 +60,7 @@ define <16 x i8> @test_v16i8_reassociation(<16 x i8> %a) {
 define <16 x i8> @test_v16i8_demandedbits(<16 x i8> %x, <16 x i8> %y, <16 x i8> %a, <16 x i8> %b) {
 ; SSE2-LABEL: test_v16i8_demandedbits:
 ; SSE2:       # %bb.0:
-; SSE2-NEXT:    pmaxub %xmm1, %xmm0
+; SSE2-NEXT:    por %xmm1, %xmm0
----------------
phoebewang wrote:

Seems AVX512BW doesn't utilize the info. I assume `vpor + vpmovb2m` is a litter better.

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


More information about the llvm-commits mailing list