[PATCH] D52121: [X86] Fold (movmsk (setne (and X, (1 << C)), 0)) -> (movmsk (X << C))

Simon Pilgrim via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Sep 14 15:03:49 PDT 2018


RKSimon added inline comments.


================
Comment at: test/CodeGen/X86/movmsk-cmp.ll:1128
+; SSE2-NEXT:    psllw $7, %xmm0
+; SSE2-NEXT:    pand {{.*}}(%rip), %xmm0
 ; SSE2-NEXT:    pmovmskb %xmm0, %eax
----------------
Are these and masks necessary - we're only using the signbit?


================
Comment at: test/CodeGen/X86/movmsk-cmp.ll:1221
 ; AVX1-NEXT:    vzeroupper
 ; AVX1-NEXT:    retq
 ;
----------------
Fix AVX1 case too?


https://reviews.llvm.org/D52121





More information about the llvm-commits mailing list