llvm.org GIT mirror llvm / 298666c
[X86][SSE4A] Add EXTRQ/INSERTQ values to BTVER2 scheduling model git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@308132 91177308-0d34-0410-b5e6-96231b3b80d8 Simon Pilgrim 3 years ago
2 changed file(s) with 20 addition(s) and 4 deletion(s). Raw diff Collapse all Expand all
370370 def : WriteRes;
371371
372372 ////////////////////////////////////////////////////////////////////////////////
373 // SSE4A instructions.
374 ////////////////////////////////////////////////////////////////////////////////
375
376 def WriteEXTRQ: SchedWriteRes<[JFPU01]> {
377 let Latency = 1;
378 let ResourceCycles = [1];
379 }
380 def : InstRW<[WriteEXTRQ], (instregex "EXTRQ")>;
381
382 def WriteINSERTQ: SchedWriteRes<[JFPU01]> {
383 let Latency = 2;
384 let ResourceCycles = [4];
385 }
386 def : InstRW<[WriteINSERTQ], (instregex "INSERTQ")>;
387
388 ////////////////////////////////////////////////////////////////////////////////
373389 // AVX instructions.
374390 ////////////////////////////////////////////////////////////////////////////////
375391
1010 ;
1111 ; BTVER2-LABEL: test_extrq:
1212 ; BTVER2: # BB#0:
13 ; BTVER2-NEXT: extrq %xmm1, %xmm0
13 ; BTVER2-NEXT: extrq %xmm1, %xmm0 # sched: [1:0.50]
1414 ; BTVER2-NEXT: retq # sched: [4:1.00]
1515 %1 = tail call <2 x i64> @llvm.x86.sse4a.extrq(<2 x i64> %a0, <16 x i8> %a1)
1616 ret <2 x i64> %1
2525 ;
2626 ; BTVER2-LABEL: test_extrqi:
2727 ; BTVER2: # BB#0:
28 ; BTVER2-NEXT: extrq $2, $3, %xmm0
28 ; BTVER2-NEXT: extrq $2, $3, %xmm0 # sched: [1:0.50]
2929 ; BTVER2-NEXT: retq # sched: [4:1.00]
3030 %1 = tail call <2 x i64> @llvm.x86.sse4a.extrqi(<2 x i64> %a0, i8 3, i8 2)
3131 ret <2 x i64> %1
4040 ;
4141 ; BTVER2-LABEL: test_insertq:
4242 ; BTVER2: # BB#0:
43 ; BTVER2-NEXT: insertq %xmm1, %xmm0
43 ; BTVER2-NEXT: insertq %xmm1, %xmm0 # sched: [2:2.00]
4444 ; BTVER2-NEXT: retq # sched: [4:1.00]
4545 %1 = tail call <2 x i64> @llvm.x86.sse4a.insertq(<2 x i64> %a0, <2 x i64> %a1)
4646 ret <2 x i64> %1
5555 ;
5656 ; BTVER2-LABEL: test_insertqi:
5757 ; BTVER2: # BB#0:
58 ; BTVER2-NEXT: insertq $6, $5, %xmm1, %xmm0
58 ; BTVER2-NEXT: insertq $6, $5, %xmm1, %xmm0 # sched: [2:2.00]
5959 ; BTVER2-NEXT: retq # sched: [4:1.00]
6060 %1 = tail call <2 x i64> @llvm.x86.sse4a.insertqi(<2 x i64> %a0, <2 x i64> %a1, i8 5, i8 6)
6161 ret <2 x i64> %1