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

Craig Topper via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Sep 14 15:12:26 PDT 2018


craig.topper 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
----------------
RKSimon wrote:
> Are these and masks necessary - we're only using the signbit?
No. I guess SimplifyDemandedBits can't make it through the lowered v16i8 shift. Probably due to the bitcasts or the promotion of and to v2i64?


https://reviews.llvm.org/D52121





More information about the llvm-commits mailing list