forked from OSchip/llvm-project
[X86] Pre-commit the test-shrink.ll changes from D86578.
The conditions in these tests are guaranteed to always go one direction. InstCombine would have folded them away.
This commit is contained in:
parent
c01a4adf99
commit
81733fd276
|
@ -579,7 +579,7 @@ define void @and16_trunc_8_sign(i16 %x) nounwind {
|
|||
; CHECK-LINUX64-LABEL: and16_trunc_8_sign:
|
||||
; CHECK-LINUX64: # %bb.0:
|
||||
; CHECK-LINUX64-NEXT: testb $-128, %dil
|
||||
; CHECK-LINUX64-NEXT: jg .LBB13_2
|
||||
; CHECK-LINUX64-NEXT: js .LBB13_2
|
||||
; CHECK-LINUX64-NEXT: # %bb.1: # %yes
|
||||
; CHECK-LINUX64-NEXT: pushq %rax
|
||||
; CHECK-LINUX64-NEXT: callq bar
|
||||
|
@ -591,7 +591,7 @@ define void @and16_trunc_8_sign(i16 %x) nounwind {
|
|||
; CHECK-WIN32-64: # %bb.0:
|
||||
; CHECK-WIN32-64-NEXT: subq $40, %rsp
|
||||
; CHECK-WIN32-64-NEXT: testb $-128, %cl
|
||||
; CHECK-WIN32-64-NEXT: jg .LBB13_2
|
||||
; CHECK-WIN32-64-NEXT: js .LBB13_2
|
||||
; CHECK-WIN32-64-NEXT: # %bb.1: # %yes
|
||||
; CHECK-WIN32-64-NEXT: callq bar
|
||||
; CHECK-WIN32-64-NEXT: .LBB13_2: # %no
|
||||
|
@ -601,14 +601,14 @@ define void @and16_trunc_8_sign(i16 %x) nounwind {
|
|||
; CHECK-X86-LABEL: and16_trunc_8_sign:
|
||||
; CHECK-X86: # %bb.0:
|
||||
; CHECK-X86-NEXT: testb $-128, {{[0-9]+}}(%esp)
|
||||
; CHECK-X86-NEXT: jg .LBB13_2
|
||||
; CHECK-X86-NEXT: js .LBB13_2
|
||||
; CHECK-X86-NEXT: # %bb.1: # %yes
|
||||
; CHECK-X86-NEXT: calll bar
|
||||
; CHECK-X86-NEXT: .LBB13_2: # %no
|
||||
; CHECK-X86-NEXT: retl
|
||||
%t = and i16 %x, 128
|
||||
%r = trunc i16 %t to i8
|
||||
%s = icmp sle i8 %r, 0
|
||||
%s = icmp sge i8 %r, 0
|
||||
br i1 %s, label %yes, label %no
|
||||
|
||||
yes:
|
||||
|
@ -622,7 +622,7 @@ define void @and32_trunc_8_sign(i32 %x) nounwind {
|
|||
; CHECK-LINUX64-LABEL: and32_trunc_8_sign:
|
||||
; CHECK-LINUX64: # %bb.0:
|
||||
; CHECK-LINUX64-NEXT: testb $-128, %dil
|
||||
; CHECK-LINUX64-NEXT: jg .LBB14_2
|
||||
; CHECK-LINUX64-NEXT: js .LBB14_2
|
||||
; CHECK-LINUX64-NEXT: # %bb.1: # %yes
|
||||
; CHECK-LINUX64-NEXT: pushq %rax
|
||||
; CHECK-LINUX64-NEXT: callq bar
|
||||
|
@ -634,7 +634,7 @@ define void @and32_trunc_8_sign(i32 %x) nounwind {
|
|||
; CHECK-WIN32-64: # %bb.0:
|
||||
; CHECK-WIN32-64-NEXT: subq $40, %rsp
|
||||
; CHECK-WIN32-64-NEXT: testb $-128, %cl
|
||||
; CHECK-WIN32-64-NEXT: jg .LBB14_2
|
||||
; CHECK-WIN32-64-NEXT: js .LBB14_2
|
||||
; CHECK-WIN32-64-NEXT: # %bb.1: # %yes
|
||||
; CHECK-WIN32-64-NEXT: callq bar
|
||||
; CHECK-WIN32-64-NEXT: .LBB14_2: # %no
|
||||
|
@ -644,14 +644,14 @@ define void @and32_trunc_8_sign(i32 %x) nounwind {
|
|||
; CHECK-X86-LABEL: and32_trunc_8_sign:
|
||||
; CHECK-X86: # %bb.0:
|
||||
; CHECK-X86-NEXT: testb $-128, {{[0-9]+}}(%esp)
|
||||
; CHECK-X86-NEXT: jg .LBB14_2
|
||||
; CHECK-X86-NEXT: js .LBB14_2
|
||||
; CHECK-X86-NEXT: # %bb.1: # %yes
|
||||
; CHECK-X86-NEXT: calll bar
|
||||
; CHECK-X86-NEXT: .LBB14_2: # %no
|
||||
; CHECK-X86-NEXT: retl
|
||||
%t = and i32 %x, 128
|
||||
%r = trunc i32 %t to i8
|
||||
%s = icmp sle i8 %r, 0
|
||||
%s = icmp sge i8 %r, 0
|
||||
br i1 %s, label %yes, label %no
|
||||
|
||||
yes:
|
||||
|
@ -665,7 +665,7 @@ define void @and64_trunc_8_sign(i64 %x) nounwind {
|
|||
; CHECK-LINUX64-LABEL: and64_trunc_8_sign:
|
||||
; CHECK-LINUX64: # %bb.0:
|
||||
; CHECK-LINUX64-NEXT: testb $-128, %dil
|
||||
; CHECK-LINUX64-NEXT: jg .LBB15_2
|
||||
; CHECK-LINUX64-NEXT: js .LBB15_2
|
||||
; CHECK-LINUX64-NEXT: # %bb.1: # %yes
|
||||
; CHECK-LINUX64-NEXT: pushq %rax
|
||||
; CHECK-LINUX64-NEXT: callq bar
|
||||
|
@ -677,7 +677,7 @@ define void @and64_trunc_8_sign(i64 %x) nounwind {
|
|||
; CHECK-WIN32-64: # %bb.0:
|
||||
; CHECK-WIN32-64-NEXT: subq $40, %rsp
|
||||
; CHECK-WIN32-64-NEXT: testb $-128, %cl
|
||||
; CHECK-WIN32-64-NEXT: jg .LBB15_2
|
||||
; CHECK-WIN32-64-NEXT: js .LBB15_2
|
||||
; CHECK-WIN32-64-NEXT: # %bb.1: # %yes
|
||||
; CHECK-WIN32-64-NEXT: callq bar
|
||||
; CHECK-WIN32-64-NEXT: .LBB15_2: # %no
|
||||
|
@ -687,14 +687,14 @@ define void @and64_trunc_8_sign(i64 %x) nounwind {
|
|||
; CHECK-X86-LABEL: and64_trunc_8_sign:
|
||||
; CHECK-X86: # %bb.0:
|
||||
; CHECK-X86-NEXT: testb $-128, {{[0-9]+}}(%esp)
|
||||
; CHECK-X86-NEXT: jg .LBB15_2
|
||||
; CHECK-X86-NEXT: js .LBB15_2
|
||||
; CHECK-X86-NEXT: # %bb.1: # %yes
|
||||
; CHECK-X86-NEXT: calll bar
|
||||
; CHECK-X86-NEXT: .LBB15_2: # %no
|
||||
; CHECK-X86-NEXT: retl
|
||||
%t = and i64 %x, 128
|
||||
%r = trunc i64 %t to i8
|
||||
%s = icmp sle i8 %r, 0
|
||||
%s = icmp sge i8 %r, 0
|
||||
br i1 %s, label %yes, label %no
|
||||
|
||||
yes:
|
||||
|
@ -709,7 +709,7 @@ define void @and32_trunc_16_sign(i32 %x) nounwind {
|
|||
; CHECK-LINUX64: # %bb.0:
|
||||
; CHECK-LINUX64-NEXT: andl $32768, %edi # imm = 0x8000
|
||||
; CHECK-LINUX64-NEXT: testw %di, %di
|
||||
; CHECK-LINUX64-NEXT: jg .LBB16_2
|
||||
; CHECK-LINUX64-NEXT: js .LBB16_2
|
||||
; CHECK-LINUX64-NEXT: # %bb.1: # %yes
|
||||
; CHECK-LINUX64-NEXT: pushq %rax
|
||||
; CHECK-LINUX64-NEXT: callq bar
|
||||
|
@ -722,7 +722,7 @@ define void @and32_trunc_16_sign(i32 %x) nounwind {
|
|||
; CHECK-WIN32-64-NEXT: subq $40, %rsp
|
||||
; CHECK-WIN32-64-NEXT: andl $32768, %ecx # imm = 0x8000
|
||||
; CHECK-WIN32-64-NEXT: testw %cx, %cx
|
||||
; CHECK-WIN32-64-NEXT: jg .LBB16_2
|
||||
; CHECK-WIN32-64-NEXT: js .LBB16_2
|
||||
; CHECK-WIN32-64-NEXT: # %bb.1: # %yes
|
||||
; CHECK-WIN32-64-NEXT: callq bar
|
||||
; CHECK-WIN32-64-NEXT: .LBB16_2: # %no
|
||||
|
@ -734,14 +734,14 @@ define void @and32_trunc_16_sign(i32 %x) nounwind {
|
|||
; CHECK-X86-NEXT: movzwl {{[0-9]+}}(%esp), %eax
|
||||
; CHECK-X86-NEXT: andl $32768, %eax # imm = 0x8000
|
||||
; CHECK-X86-NEXT: testw %ax, %ax
|
||||
; CHECK-X86-NEXT: jg .LBB16_2
|
||||
; CHECK-X86-NEXT: js .LBB16_2
|
||||
; CHECK-X86-NEXT: # %bb.1: # %yes
|
||||
; CHECK-X86-NEXT: calll bar
|
||||
; CHECK-X86-NEXT: .LBB16_2: # %no
|
||||
; CHECK-X86-NEXT: retl
|
||||
%t = and i32 %x, 32768
|
||||
%r = trunc i32 %t to i16
|
||||
%s = icmp sle i16 %r, 0
|
||||
%s = icmp sge i16 %r, 0
|
||||
br i1 %s, label %yes, label %no
|
||||
|
||||
yes:
|
||||
|
@ -755,7 +755,7 @@ define void @and32_trunc_16_sign_minsize(i32 %x) minsize nounwind {
|
|||
; CHECK-LINUX64-LABEL: and32_trunc_16_sign_minsize:
|
||||
; CHECK-LINUX64: # %bb.0:
|
||||
; CHECK-LINUX64-NEXT: testw $-32768, %di # imm = 0x8000
|
||||
; CHECK-LINUX64-NEXT: jg .LBB17_2
|
||||
; CHECK-LINUX64-NEXT: js .LBB17_2
|
||||
; CHECK-LINUX64-NEXT: # %bb.1: # %yes
|
||||
; CHECK-LINUX64-NEXT: pushq %rax
|
||||
; CHECK-LINUX64-NEXT: callq bar
|
||||
|
@ -767,7 +767,7 @@ define void @and32_trunc_16_sign_minsize(i32 %x) minsize nounwind {
|
|||
; CHECK-WIN32-64: # %bb.0:
|
||||
; CHECK-WIN32-64-NEXT: subq $40, %rsp
|
||||
; CHECK-WIN32-64-NEXT: testw $-32768, %cx # imm = 0x8000
|
||||
; CHECK-WIN32-64-NEXT: jg .LBB17_2
|
||||
; CHECK-WIN32-64-NEXT: js .LBB17_2
|
||||
; CHECK-WIN32-64-NEXT: # %bb.1: # %yes
|
||||
; CHECK-WIN32-64-NEXT: callq bar
|
||||
; CHECK-WIN32-64-NEXT: .LBB17_2: # %no
|
||||
|
@ -778,14 +778,14 @@ define void @and32_trunc_16_sign_minsize(i32 %x) minsize nounwind {
|
|||
; CHECK-X86: # %bb.0:
|
||||
; CHECK-X86-NEXT: movzwl {{[0-9]+}}(%esp), %eax
|
||||
; CHECK-X86-NEXT: testw $-32768, %ax # imm = 0x8000
|
||||
; CHECK-X86-NEXT: jg .LBB17_2
|
||||
; CHECK-X86-NEXT: js .LBB17_2
|
||||
; CHECK-X86-NEXT: # %bb.1: # %yes
|
||||
; CHECK-X86-NEXT: calll bar
|
||||
; CHECK-X86-NEXT: .LBB17_2: # %no
|
||||
; CHECK-X86-NEXT: retl
|
||||
%t = and i32 %x, 32768
|
||||
%r = trunc i32 %t to i16
|
||||
%s = icmp sle i16 %r, 0
|
||||
%s = icmp sge i16 %r, 0
|
||||
br i1 %s, label %yes, label %no
|
||||
|
||||
yes:
|
||||
|
@ -800,7 +800,7 @@ define void @and64_trunc_16_sign(i64 %x) nounwind {
|
|||
; CHECK-LINUX64: # %bb.0:
|
||||
; CHECK-LINUX64-NEXT: andl $32768, %edi # imm = 0x8000
|
||||
; CHECK-LINUX64-NEXT: testw %di, %di
|
||||
; CHECK-LINUX64-NEXT: jg .LBB18_2
|
||||
; CHECK-LINUX64-NEXT: js .LBB18_2
|
||||
; CHECK-LINUX64-NEXT: # %bb.1: # %yes
|
||||
; CHECK-LINUX64-NEXT: pushq %rax
|
||||
; CHECK-LINUX64-NEXT: callq bar
|
||||
|
@ -813,7 +813,7 @@ define void @and64_trunc_16_sign(i64 %x) nounwind {
|
|||
; CHECK-WIN32-64-NEXT: subq $40, %rsp
|
||||
; CHECK-WIN32-64-NEXT: andl $32768, %ecx # imm = 0x8000
|
||||
; CHECK-WIN32-64-NEXT: testw %cx, %cx
|
||||
; CHECK-WIN32-64-NEXT: jg .LBB18_2
|
||||
; CHECK-WIN32-64-NEXT: js .LBB18_2
|
||||
; CHECK-WIN32-64-NEXT: # %bb.1: # %yes
|
||||
; CHECK-WIN32-64-NEXT: callq bar
|
||||
; CHECK-WIN32-64-NEXT: .LBB18_2: # %no
|
||||
|
@ -825,14 +825,14 @@ define void @and64_trunc_16_sign(i64 %x) nounwind {
|
|||
; CHECK-X86-NEXT: movl $32768, %eax # imm = 0x8000
|
||||
; CHECK-X86-NEXT: andl {{[0-9]+}}(%esp), %eax
|
||||
; CHECK-X86-NEXT: testw %ax, %ax
|
||||
; CHECK-X86-NEXT: jg .LBB18_2
|
||||
; CHECK-X86-NEXT: js .LBB18_2
|
||||
; CHECK-X86-NEXT: # %bb.1: # %yes
|
||||
; CHECK-X86-NEXT: calll bar
|
||||
; CHECK-X86-NEXT: .LBB18_2: # %no
|
||||
; CHECK-X86-NEXT: retl
|
||||
%t = and i64 %x, 32768
|
||||
%r = trunc i64 %t to i16
|
||||
%s = icmp sle i16 %r, 0
|
||||
%s = icmp sge i16 %r, 0
|
||||
br i1 %s, label %yes, label %no
|
||||
|
||||
yes:
|
||||
|
@ -846,7 +846,7 @@ define void @and64_trunc_16_sign_minsize(i64 %x) minsize nounwind {
|
|||
; CHECK-LINUX64-LABEL: and64_trunc_16_sign_minsize:
|
||||
; CHECK-LINUX64: # %bb.0:
|
||||
; CHECK-LINUX64-NEXT: testw $-32768, %di # imm = 0x8000
|
||||
; CHECK-LINUX64-NEXT: jg .LBB19_2
|
||||
; CHECK-LINUX64-NEXT: js .LBB19_2
|
||||
; CHECK-LINUX64-NEXT: # %bb.1: # %yes
|
||||
; CHECK-LINUX64-NEXT: pushq %rax
|
||||
; CHECK-LINUX64-NEXT: callq bar
|
||||
|
@ -858,7 +858,7 @@ define void @and64_trunc_16_sign_minsize(i64 %x) minsize nounwind {
|
|||
; CHECK-WIN32-64: # %bb.0:
|
||||
; CHECK-WIN32-64-NEXT: subq $40, %rsp
|
||||
; CHECK-WIN32-64-NEXT: testw $-32768, %cx # imm = 0x8000
|
||||
; CHECK-WIN32-64-NEXT: jg .LBB19_2
|
||||
; CHECK-WIN32-64-NEXT: js .LBB19_2
|
||||
; CHECK-WIN32-64-NEXT: # %bb.1: # %yes
|
||||
; CHECK-WIN32-64-NEXT: callq bar
|
||||
; CHECK-WIN32-64-NEXT: .LBB19_2: # %no
|
||||
|
@ -868,14 +868,14 @@ define void @and64_trunc_16_sign_minsize(i64 %x) minsize nounwind {
|
|||
; CHECK-X86-LABEL: and64_trunc_16_sign_minsize:
|
||||
; CHECK-X86: # %bb.0:
|
||||
; CHECK-X86-NEXT: testw $-32768, {{[0-9]+}}(%esp) # imm = 0x8000
|
||||
; CHECK-X86-NEXT: jg .LBB19_2
|
||||
; CHECK-X86-NEXT: js .LBB19_2
|
||||
; CHECK-X86-NEXT: # %bb.1: # %yes
|
||||
; CHECK-X86-NEXT: calll bar
|
||||
; CHECK-X86-NEXT: .LBB19_2: # %no
|
||||
; CHECK-X86-NEXT: retl
|
||||
%t = and i64 %x, 32768
|
||||
%r = trunc i64 %t to i16
|
||||
%s = icmp sle i16 %r, 0
|
||||
%s = icmp sge i16 %r, 0
|
||||
br i1 %s, label %yes, label %no
|
||||
|
||||
yes:
|
||||
|
@ -889,7 +889,7 @@ define void @and64_trunc_32_sign(i64 %x) nounwind {
|
|||
; CHECK-LINUX64-LABEL: and64_trunc_32_sign:
|
||||
; CHECK-LINUX64: # %bb.0:
|
||||
; CHECK-LINUX64-NEXT: testl $-2147483648, %edi # imm = 0x80000000
|
||||
; CHECK-LINUX64-NEXT: jg .LBB20_2
|
||||
; CHECK-LINUX64-NEXT: js .LBB20_2
|
||||
; CHECK-LINUX64-NEXT: # %bb.1: # %yes
|
||||
; CHECK-LINUX64-NEXT: pushq %rax
|
||||
; CHECK-LINUX64-NEXT: callq bar
|
||||
|
@ -901,7 +901,7 @@ define void @and64_trunc_32_sign(i64 %x) nounwind {
|
|||
; CHECK-WIN32-64: # %bb.0:
|
||||
; CHECK-WIN32-64-NEXT: subq $40, %rsp
|
||||
; CHECK-WIN32-64-NEXT: testl $-2147483648, %ecx # imm = 0x80000000
|
||||
; CHECK-WIN32-64-NEXT: jg .LBB20_2
|
||||
; CHECK-WIN32-64-NEXT: js .LBB20_2
|
||||
; CHECK-WIN32-64-NEXT: # %bb.1: # %yes
|
||||
; CHECK-WIN32-64-NEXT: callq bar
|
||||
; CHECK-WIN32-64-NEXT: .LBB20_2: # %no
|
||||
|
@ -911,14 +911,14 @@ define void @and64_trunc_32_sign(i64 %x) nounwind {
|
|||
; CHECK-X86-LABEL: and64_trunc_32_sign:
|
||||
; CHECK-X86: # %bb.0:
|
||||
; CHECK-X86-NEXT: testl $-2147483648, {{[0-9]+}}(%esp) # imm = 0x80000000
|
||||
; CHECK-X86-NEXT: jg .LBB20_2
|
||||
; CHECK-X86-NEXT: js .LBB20_2
|
||||
; CHECK-X86-NEXT: # %bb.1: # %yes
|
||||
; CHECK-X86-NEXT: calll bar
|
||||
; CHECK-X86-NEXT: .LBB20_2: # %no
|
||||
; CHECK-X86-NEXT: retl
|
||||
%t = and i64 %x, 2147483648
|
||||
%r = trunc i64 %t to i32
|
||||
%s = icmp sle i32 %r, 0
|
||||
%s = icmp sge i32 %r, 0
|
||||
br i1 %s, label %yes, label %no
|
||||
|
||||
yes:
|
||||
|
|
Loading…
Reference in New Issue