[X86][SSE] Added missing vector logic intrinsic schedules

Improves atom scheduler test coverage (to make it easier to upgrade them for PR32431).

Merged SSE_VEC_BIT_ITINS_P + SSE_BIT_ITINS_P as we were interchanging between them.

llvm-svn: 309715
This commit is contained in:
Simon Pilgrim 2017-08-01 17:51:20 +00:00
parent 4d111202e7
commit 1abbd42308
3 changed files with 26 additions and 46 deletions

View File

@ -120,10 +120,6 @@ def SSE_DIV_ITINS_P : SizeItins<
>;
let Sched = WriteVecLogic in
def SSE_VEC_BIT_ITINS_P : OpndItins<
IIC_SSE_BIT_P_RR, IIC_SSE_BIT_P_RM
>;
def SSE_BIT_ITINS_P : OpndItins<
IIC_SSE_BIT_P_RR, IIC_SSE_BIT_P_RM
>;
@ -312,13 +308,13 @@ multiclass sse12_fp_packed_logical_rm<bits<8> opc, RegisterClass RC, Domain d,
!if(Is2Addr,
!strconcat(OpcodeStr, "\t{$src2, $dst|$dst, $src2}"),
!strconcat(OpcodeStr, "\t{$src2, $src1, $dst|$dst, $src1, $src2}")),
pat_rr, NoItinerary, d>,
pat_rr, IIC_SSE_BIT_P_RR, d>,
Sched<[WriteVecLogic]>;
def rm : PI<opc, MRMSrcMem, (outs RC:$dst), (ins RC:$src1, x86memop:$src2),
!if(Is2Addr,
!strconcat(OpcodeStr, "\t{$src2, $dst|$dst, $src2}"),
!strconcat(OpcodeStr, "\t{$src2, $src1, $dst|$dst, $src1, $src2}")),
pat_rm, NoItinerary, d>,
pat_rm, IIC_SSE_BIT_P_RM, d>,
Sched<[WriteVecLogicLd, ReadAfterLd]>;
}
@ -2789,13 +2785,13 @@ let Predicates = [HasAVX2, prd] in
// These are ordered here for pattern ordering requirements with the fp versions
defm PAND : PDI_binop_all<0xDB, "pand", and, v2i64, v4i64,
SSE_VEC_BIT_ITINS_P, 1, NoVLX>;
SSE_BIT_ITINS_P, 1, NoVLX>;
defm POR : PDI_binop_all<0xEB, "por", or, v2i64, v4i64,
SSE_VEC_BIT_ITINS_P, 1, NoVLX>;
SSE_BIT_ITINS_P, 1, NoVLX>;
defm PXOR : PDI_binop_all<0xEF, "pxor", xor, v2i64, v4i64,
SSE_VEC_BIT_ITINS_P, 1, NoVLX>;
SSE_BIT_ITINS_P, 1, NoVLX>;
defm PANDN : PDI_binop_all<0xDF, "pandn", X86andnp, v2i64, v4i64,
SSE_VEC_BIT_ITINS_P, 0, NoVLX>;
SSE_BIT_ITINS_P, 0, NoVLX>;
//===----------------------------------------------------------------------===//
// SSE 1 & 2 - Logical Instructions

View File

@ -114,12 +114,8 @@ define <4 x float> @test_andps(<4 x float> %a0, <4 x float> %a1, <4 x float> *%a
;
; ATOM-LABEL: test_andps:
; ATOM: # BB#0:
; ATOM-NEXT: andps %xmm1, %xmm0
; ATOM-NEXT: andps (%rdi), %xmm0
; ATOM-NEXT: nop # sched: [1:0.50]
; ATOM-NEXT: nop # sched: [1:0.50]
; ATOM-NEXT: nop # sched: [1:0.50]
; ATOM-NEXT: nop # sched: [1:0.50]
; ATOM-NEXT: andps %xmm1, %xmm0 # sched: [1:0.50]
; ATOM-NEXT: andps (%rdi), %xmm0 # sched: [1:1.00]
; ATOM-NEXT: nop # sched: [1:0.50]
; ATOM-NEXT: nop # sched: [1:0.50]
; ATOM-NEXT: nop # sched: [1:0.50]
@ -174,12 +170,8 @@ define <4 x float> @test_andnotps(<4 x float> %a0, <4 x float> %a1, <4 x float>
;
; ATOM-LABEL: test_andnotps:
; ATOM: # BB#0:
; ATOM-NEXT: andnps %xmm1, %xmm0
; ATOM-NEXT: andnps (%rdi), %xmm0
; ATOM-NEXT: nop # sched: [1:0.50]
; ATOM-NEXT: nop # sched: [1:0.50]
; ATOM-NEXT: nop # sched: [1:0.50]
; ATOM-NEXT: nop # sched: [1:0.50]
; ATOM-NEXT: andnps %xmm1, %xmm0 # sched: [1:0.50]
; ATOM-NEXT: andnps (%rdi), %xmm0 # sched: [1:1.00]
; ATOM-NEXT: nop # sched: [1:0.50]
; ATOM-NEXT: nop # sched: [1:0.50]
; ATOM-NEXT: nop # sched: [1:0.50]
@ -239,7 +231,7 @@ define <4 x float> @test_cmpps(<4 x float> %a0, <4 x float> %a1, <4 x float> *%a
; ATOM: # BB#0:
; ATOM-NEXT: cmpeqps %xmm0, %xmm1 # sched: [5:5.00]
; ATOM-NEXT: cmpeqps (%rdi), %xmm0 # sched: [5:5.00]
; ATOM-NEXT: orps %xmm1, %xmm0
; ATOM-NEXT: orps %xmm1, %xmm0 # sched: [1:0.50]
; ATOM-NEXT: retq # sched: [79:39.50]
;
; SLM-LABEL: test_cmpps:
@ -1748,12 +1740,8 @@ define <4 x float> @test_orps(<4 x float> %a0, <4 x float> %a1, <4 x float> *%a2
;
; ATOM-LABEL: test_orps:
; ATOM: # BB#0:
; ATOM-NEXT: orps %xmm1, %xmm0
; ATOM-NEXT: orps (%rdi), %xmm0
; ATOM-NEXT: nop # sched: [1:0.50]
; ATOM-NEXT: nop # sched: [1:0.50]
; ATOM-NEXT: nop # sched: [1:0.50]
; ATOM-NEXT: nop # sched: [1:0.50]
; ATOM-NEXT: orps %xmm1, %xmm0 # sched: [1:0.50]
; ATOM-NEXT: orps (%rdi), %xmm0 # sched: [1:1.00]
; ATOM-NEXT: nop # sched: [1:0.50]
; ATOM-NEXT: nop # sched: [1:0.50]
; ATOM-NEXT: nop # sched: [1:0.50]
@ -2686,12 +2674,8 @@ define <4 x float> @test_xorps(<4 x float> %a0, <4 x float> %a1, <4 x float> *%a
;
; ATOM-LABEL: test_xorps:
; ATOM: # BB#0:
; ATOM-NEXT: xorps %xmm1, %xmm0
; ATOM-NEXT: xorps (%rdi), %xmm0
; ATOM-NEXT: nop # sched: [1:0.50]
; ATOM-NEXT: nop # sched: [1:0.50]
; ATOM-NEXT: nop # sched: [1:0.50]
; ATOM-NEXT: nop # sched: [1:0.50]
; ATOM-NEXT: xorps %xmm1, %xmm0 # sched: [1:0.50]
; ATOM-NEXT: xorps (%rdi), %xmm0 # sched: [1:1.00]
; ATOM-NEXT: nop # sched: [1:0.50]
; ATOM-NEXT: nop # sched: [1:0.50]
; ATOM-NEXT: nop # sched: [1:0.50]

View File

@ -115,8 +115,8 @@ define <2 x double> @test_andpd(<2 x double> %a0, <2 x double> %a1, <2 x double>
;
; ATOM-LABEL: test_andpd:
; ATOM: # BB#0:
; ATOM-NEXT: andpd %xmm1, %xmm0
; ATOM-NEXT: andpd (%rdi), %xmm0
; ATOM-NEXT: andpd %xmm1, %xmm0 # sched: [1:0.50]
; ATOM-NEXT: andpd (%rdi), %xmm0 # sched: [1:1.00]
; ATOM-NEXT: addpd %xmm1, %xmm0 # sched: [6:3.00]
; ATOM-NEXT: retq # sched: [79:39.50]
;
@ -175,8 +175,8 @@ define <2 x double> @test_andnotpd(<2 x double> %a0, <2 x double> %a1, <2 x doub
;
; ATOM-LABEL: test_andnotpd:
; ATOM: # BB#0:
; ATOM-NEXT: andnpd %xmm1, %xmm0
; ATOM-NEXT: andnpd (%rdi), %xmm0
; ATOM-NEXT: andnpd %xmm1, %xmm0 # sched: [1:0.50]
; ATOM-NEXT: andnpd (%rdi), %xmm0 # sched: [1:1.00]
; ATOM-NEXT: addpd %xmm1, %xmm0 # sched: [6:3.00]
; ATOM-NEXT: retq # sched: [79:39.50]
;
@ -239,7 +239,7 @@ define <2 x double> @test_cmppd(<2 x double> %a0, <2 x double> %a1, <2 x double>
; ATOM: # BB#0:
; ATOM-NEXT: cmpeqpd %xmm0, %xmm1 # sched: [6:3.00]
; ATOM-NEXT: cmpeqpd (%rdi), %xmm0 # sched: [7:3.50]
; ATOM-NEXT: orpd %xmm1, %xmm0
; ATOM-NEXT: orpd %xmm1, %xmm0 # sched: [1:0.50]
; ATOM-NEXT: retq # sched: [79:39.50]
;
; SLM-LABEL: test_cmppd:
@ -923,7 +923,7 @@ define float @test_cvtsd2ss(double %a0, double *%a1) {
; ATOM: # BB#0:
; ATOM-NEXT: movsd {{.*#+}} xmm1 = mem[0],zero sched: [1:1.00]
; ATOM-NEXT: cvtsd2ss %xmm0, %xmm2 # sched: [6:3.00]
; ATOM-NEXT: xorps %xmm0, %xmm0
; ATOM-NEXT: xorps %xmm0, %xmm0 # sched: [1:0.50]
; ATOM-NEXT: cvtsd2ss %xmm1, %xmm0 # sched: [6:3.00]
; ATOM-NEXT: addss %xmm2, %xmm0 # sched: [5:5.00]
; ATOM-NEXT: retq # sched: [79:39.50]
@ -1101,7 +1101,7 @@ define double @test_cvtss2sd(float %a0, float *%a1) {
; ATOM: # BB#0:
; ATOM-NEXT: movss {{.*#+}} xmm1 = mem[0],zero,zero,zero sched: [1:1.00]
; ATOM-NEXT: cvtss2sd %xmm0, %xmm2 # sched: [6:3.00]
; ATOM-NEXT: xorps %xmm0, %xmm0
; ATOM-NEXT: xorps %xmm0, %xmm0 # sched: [1:0.50]
; ATOM-NEXT: cvtss2sd %xmm1, %xmm0 # sched: [6:3.00]
; ATOM-NEXT: addsd %xmm2, %xmm0 # sched: [5:5.00]
; ATOM-NEXT: retq # sched: [79:39.50]
@ -2757,8 +2757,8 @@ define <2 x double> @test_orpd(<2 x double> %a0, <2 x double> %a1, <2 x double>
;
; ATOM-LABEL: test_orpd:
; ATOM: # BB#0:
; ATOM-NEXT: orpd %xmm1, %xmm0
; ATOM-NEXT: orpd (%rdi), %xmm0
; ATOM-NEXT: orpd %xmm1, %xmm0 # sched: [1:0.50]
; ATOM-NEXT: orpd (%rdi), %xmm0 # sched: [1:1.00]
; ATOM-NEXT: addpd %xmm1, %xmm0 # sched: [6:3.00]
; ATOM-NEXT: retq # sched: [79:39.50]
;
@ -6842,8 +6842,8 @@ define <2 x double> @test_xorpd(<2 x double> %a0, <2 x double> %a1, <2 x double>
;
; ATOM-LABEL: test_xorpd:
; ATOM: # BB#0:
; ATOM-NEXT: xorpd %xmm1, %xmm0
; ATOM-NEXT: xorpd (%rdi), %xmm0
; ATOM-NEXT: xorpd %xmm1, %xmm0 # sched: [1:0.50]
; ATOM-NEXT: xorpd (%rdi), %xmm0 # sched: [1:1.00]
; ATOM-NEXT: addpd %xmm1, %xmm0 # sched: [6:3.00]
; ATOM-NEXT: retq # sched: [79:39.50]
;