[llvm] r323353 - [X86] Fix some inconsistencies in the itineraries and Sched for (V)PEXTRW/(V)PINSRW
Craig Topper via llvm-commits
llvm-commits at lists.llvm.org
Wed Jan 24 09:58:57 PST 2018
Author: ctopper
Date: Wed Jan 24 09:58:57 2018
New Revision: 323353
URL: http://llvm.org/viewvc/llvm-project?rev=323353&view=rev
Log:
[X86] Fix some inconsistencies in the itineraries and Sched for (V)PEXTRW/(V)PINSRW
The weirdest being that PEXTRWrr was tagged as a memory operation.
Modified:
llvm/trunk/lib/Target/X86/X86InstrAVX512.td
llvm/trunk/lib/Target/X86/X86InstrSSE.td
llvm/trunk/test/CodeGen/X86/sse2-schedule.ll
llvm/trunk/test/CodeGen/X86/sse41-schedule.ll
Modified: llvm/trunk/lib/Target/X86/X86InstrAVX512.td
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86InstrAVX512.td?rev=323353&r1=323352&r2=323353&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/X86InstrAVX512.td (original)
+++ llvm/trunk/lib/Target/X86/X86InstrAVX512.td Wed Jan 24 09:58:57 2018
@@ -9757,7 +9757,7 @@ multiclass avx512_extract_elt_bw_m<bits<
OpcodeStr#"\t{$src2, $src1, $dst|$dst, $src1, $src2}",
[(store (_.EltVT (trunc (OpNode (_.VT _.RC:$src1), imm:$src2))),
addr:$dst)]>,
- EVEX, EVEX_CD8<_.EltSize, CD8VT1>, Sched<[WriteShuffleLd]>;
+ EVEX, EVEX_CD8<_.EltSize, CD8VT1>, Sched<[WriteShuffleLd, WriteRMW]>;
}
multiclass avx512_extract_elt_b<string OpcodeStr, X86VectorVTInfo _> {
@@ -9809,7 +9809,7 @@ multiclass avx512_extract_elt_dq<string
[(store (extractelt (_.VT _.RC:$src1),
imm:$src2),addr:$dst)]>,
EVEX, EVEX_CD8<_.EltSize, CD8VT1>, TAPD,
- Sched<[WriteShuffleLd]>;
+ Sched<[WriteShuffleLd, WriteRMW]>;
}
}
Modified: llvm/trunk/lib/Target/X86/X86InstrSSE.td
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86InstrSSE.td?rev=323353&r1=323352&r2=323353&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/X86InstrSSE.td (original)
+++ llvm/trunk/lib/Target/X86/X86InstrSSE.td Wed Jan 24 09:58:57 2018
@@ -4261,14 +4261,14 @@ def VPEXTRWrr : Ii8<0xC5, MRMSrcReg,
(outs GR32orGR64:$dst), (ins VR128:$src1, u8imm:$src2),
"vpextrw\t{$src2, $src1, $dst|$dst, $src1, $src2}",
[(set GR32orGR64:$dst, (X86pextrw (v8i16 VR128:$src1),
- imm:$src2))]>, PD, VEX,
- Sched<[WriteShuffle]>;
+ imm:$src2))], IIC_SSE_PEXTRW>,
+ PD, VEX, Sched<[WriteShuffle]>;
def PEXTRWrr : PDIi8<0xC5, MRMSrcReg,
(outs GR32orGR64:$dst), (ins VR128:$src1, u8imm:$src2),
"pextrw\t{$src2, $src1, $dst|$dst, $src1, $src2}",
[(set GR32orGR64:$dst, (X86pextrw (v8i16 VR128:$src1),
imm:$src2))], IIC_SSE_PEXTRW>,
- Sched<[WriteShuffleLd, ReadAfterLd]>;
+ Sched<[WriteShuffle]>;
// Insert
let Predicates = [HasAVX, NoBWI] in
@@ -5632,7 +5632,7 @@ multiclass SS41I_extract16<bits<8> opc,
(ins VR128:$src1, u8imm:$src2),
!strconcat(OpcodeStr,
"\t{$src2, $src1, $dst|$dst, $src1, $src2}"),
- []>, Sched<[WriteShuffle]>, FoldGenData<NAME#ri>;
+ [], IIC_SSE_PEXTRW>, Sched<[WriteShuffle]>, FoldGenData<NAME#ri>;
let hasSideEffects = 0, mayStore = 1,
SchedRW = [WriteShuffleLd, WriteRMW] in
Modified: llvm/trunk/test/CodeGen/X86/sse2-schedule.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/sse2-schedule.ll?rev=323353&r1=323352&r2=323353&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/X86/sse2-schedule.ll (original)
+++ llvm/trunk/test/CodeGen/X86/sse2-schedule.ll Wed Jan 24 09:58:57 2018
@@ -5496,7 +5496,7 @@ define i16 @test_pextrw(<8 x i16> %a0) {
;
; SLM-LABEL: test_pextrw:
; SLM: # %bb.0:
-; SLM-NEXT: pextrw $6, %xmm0, %eax # sched: [4:1.00]
+; SLM-NEXT: pextrw $6, %xmm0, %eax # sched: [1:1.00]
; SLM-NEXT: # kill: def %ax killed %ax killed %eax
; SLM-NEXT: retq # sched: [4:1.00]
;
Modified: llvm/trunk/test/CodeGen/X86/sse41-schedule.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/sse41-schedule.ll?rev=323353&r1=323352&r2=323353&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/X86/sse41-schedule.ll (original)
+++ llvm/trunk/test/CodeGen/X86/sse41-schedule.ll Wed Jan 24 09:58:57 2018
@@ -1083,7 +1083,7 @@ define i32 @test_pextrw(<8 x i16> %a0, i
;
; SLM-LABEL: test_pextrw:
; SLM: # %bb.0:
-; SLM-NEXT: pextrw $3, %xmm0, %eax # sched: [4:1.00]
+; SLM-NEXT: pextrw $3, %xmm0, %eax # sched: [1:1.00]
; SLM-NEXT: pextrw $1, %xmm0, (%rdi) # sched: [4:2.00]
; SLM-NEXT: retq # sched: [4:1.00]
;
More information about the llvm-commits
mailing list