File tree Expand file tree Collapse file tree 1 file changed +28
-0
lines changed Expand file tree Collapse file tree 1 file changed +28
-0
lines changed Original file line number Diff line number Diff line change @@ -489,6 +489,34 @@ define i32 @or_pmovmskb_pmovmskb(<16 x i8> %a0, <8 x i16> %a1) {
489489 ret i32 %7
490490}
491491
492+ ; TODO: FREEZE(MOVMSK(X)) -> MOVMSK(FREEZE(X))
493+ define i32 @movmskps_freeze (<4 x i32 > %a0 ) {
494+ ; SSE-LABEL: movmskps_freeze:
495+ ; SSE: # %bb.0:
496+ ; SSE-NEXT: movmskps %xmm0, %eax
497+ ; SSE-NEXT: andl $15, %eax
498+ ; SSE-NEXT: retq
499+ ;
500+ ; AVX-LABEL: movmskps_freeze:
501+ ; AVX: # %bb.0:
502+ ; AVX-NEXT: vmovmskps %xmm0, %eax
503+ ; AVX-NEXT: andl $15, %eax
504+ ; AVX-NEXT: retq
505+ ;
506+ ; ADL-LABEL: movmskps_freeze:
507+ ; ADL: # %bb.0:
508+ ; ADL-NEXT: vmovmskps %xmm0, %eax
509+ ; ADL-NEXT: andl $15, %eax
510+ ; ADL-NEXT: retq
511+ %1 = icmp slt <4 x i32 > %a0 , zeroinitializer
512+ %2 = sext <4 x i1 > %1 to <4 x i32 >
513+ %3 = bitcast <4 x i32 > %2 to <4 x float >
514+ %4 = tail call i32 @llvm.x86.sse.movmsk.ps (<4 x float > %3 )
515+ %5 = freeze i32 %4
516+ %6 = and i32 %5 , 15
517+ ret i32 %6
518+ }
519+
492520; We can't fold to ptest if we're not checking every pcmpeq result
493521define i32 @movmskps_ptest_numelts_mismatch (<16 x i8 > %a0 ) {
494522; SSE-LABEL: movmskps_ptest_numelts_mismatch:
You can’t perform that action at this time.
0 commit comments