Skip to content

Commit 1a41486

Browse files
committed
[X86] Add PR38960 comineqss test case
This inverts the flags result compared to the original PR38960 comieqss test case
1 parent 2182665 commit 1a41486

File tree

1 file changed

+44
-3
lines changed

1 file changed

+44
-3
lines changed

llvm/test/CodeGen/X86/comi-flags.ll

Lines changed: 44 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -594,8 +594,8 @@ define i32 @test_x86_sse2_ucomineq_sd(<2 x double> %a0, <2 x double> %a1, i32 %a
594594
}
595595
declare i32 @llvm.x86.sse2.ucomineq.sd(<2 x double>, <2 x double>) nounwind readnone
596596

597-
define void @PR38960(<4 x float> %A, <4 x float> %B) {
598-
; SSE-LABEL: PR38960:
597+
define void @PR38960_eq(<4 x float> %A, <4 x float> %B) {
598+
; SSE-LABEL: PR38960_eq:
599599
; SSE: # %bb.0: # %entry
600600
; SSE-NEXT: comiss %xmm1, %xmm0
601601
; SSE-NEXT: setnp %al
@@ -609,7 +609,7 @@ define void @PR38960(<4 x float> %A, <4 x float> %B) {
609609
; SSE-NEXT: .LBB24_1: # %if.end
610610
; SSE-NEXT: retq
611611
;
612-
; AVX-LABEL: PR38960:
612+
; AVX-LABEL: PR38960_eq:
613613
; AVX: # %bb.0: # %entry
614614
; AVX-NEXT: vcomiss %xmm1, %xmm0
615615
; AVX-NEXT: setnp %al
@@ -631,6 +631,47 @@ if.then:
631631
tail call void @foo()
632632
br label %if.end
633633

634+
if.end:
635+
ret void
636+
}
637+
638+
define void @PR38960_neq(<4 x float> %A, <4 x float> %B) {
639+
; SSE-LABEL: PR38960_neq:
640+
; SSE: # %bb.0: # %entry
641+
; SSE-NEXT: comiss %xmm1, %xmm0
642+
; SSE-NEXT: setp %al
643+
; SSE-NEXT: setne %cl
644+
; SSE-NEXT: orb %al, %cl
645+
; SSE-NEXT: movzbl %cl, %eax
646+
; SSE-NEXT: testl %eax, %eax
647+
; SSE-NEXT: je .LBB25_1
648+
; SSE-NEXT: # %bb.2: # %if.then
649+
; SSE-NEXT: jmp foo@PLT # TAILCALL
650+
; SSE-NEXT: .LBB25_1: # %if.end
651+
; SSE-NEXT: retq
652+
;
653+
; AVX-LABEL: PR38960_neq:
654+
; AVX: # %bb.0: # %entry
655+
; AVX-NEXT: vcomiss %xmm1, %xmm0
656+
; AVX-NEXT: setp %al
657+
; AVX-NEXT: setne %cl
658+
; AVX-NEXT: orb %al, %cl
659+
; AVX-NEXT: movzbl %cl, %eax
660+
; AVX-NEXT: testl %eax, %eax
661+
; AVX-NEXT: je .LBB25_1
662+
; AVX-NEXT: # %bb.2: # %if.then
663+
; AVX-NEXT: jmp foo@PLT # TAILCALL
664+
; AVX-NEXT: .LBB25_1: # %if.end
665+
; AVX-NEXT: retq
666+
entry:
667+
%call = tail call i32 @llvm.x86.sse.comineq.ss(<4 x float> %A, <4 x float> %B) #3
668+
%cmp = icmp eq i32 %call, 0
669+
br i1 %cmp, label %if.end, label %if.then
670+
671+
if.then:
672+
tail call void @foo()
673+
br label %if.end
674+
634675
if.end:
635676
ret void
636677
}

0 commit comments

Comments
 (0)