]> granicus.if.org Git - llvm/commitdiff
[X86] Tag CLFLUSHOPT with same scheduling behaviour as CLFLUSH
authorSimon Pilgrim <llvm-dev@redking.me.uk>
Tue, 28 Nov 2017 23:25:42 +0000 (23:25 +0000)
committerSimon Pilgrim <llvm-dev@redking.me.uk>
Tue, 28 Nov 2017 23:25:42 +0000 (23:25 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@319253 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/X86/X86InstrInfo.td
test/CodeGen/X86/clflushopt-schedule.ll

index 0a6f93bbc23c8966f857dbd79684c16c36c330d5..4a3d36557d38c6b660633c1f94e5ab9515d79a1b 100644 (file)
@@ -2708,9 +2708,10 @@ let Predicates = [HasTBM] in {
 // Memory Instructions
 //
 
-let Predicates = [HasCLFLUSHOPT] in
+let Predicates = [HasCLFLUSHOPT], SchedRW = [WriteLoad] in
 def CLFLUSHOPT : I<0xAE, MRM7m, (outs), (ins i8mem:$src),
-                   "clflushopt\t$src", [(int_x86_clflushopt addr:$src)]>, PD;
+                   "clflushopt\t$src", [(int_x86_clflushopt addr:$src)],
+                   IIC_SSE_PREFETCH>, PD;
 
 let Predicates = [HasCLWB] in
 def CLWB       : I<0xAE, MRM6m, (outs), (ins i8mem:$src), "clwb\t$src",
index 57f9ee1b25ec479b243fd9f138e2ef309ebf555e..3ba02f0a66ebe234dc1639824fd5ad740e41d168 100644 (file)
@@ -13,7 +13,7 @@ define void @clflushopt(i8* %p) nounwind {
 ;
 ; GLM-LABEL: clflushopt:
 ; GLM:       # BB#0:
-; GLM-NEXT:    clflushopt (%rdi)
+; GLM-NEXT:    clflushopt (%rdi) # sched: [3:1.00]
 ; GLM-NEXT:    retq # sched: [4:1.00]
 ;
 ; SKYLAKE-LABEL: clflushopt:
@@ -28,7 +28,7 @@ define void @clflushopt(i8* %p) nounwind {
 ;
 ; ZNVER1-LABEL: clflushopt:
 ; ZNVER1:       # BB#0:
-; ZNVER1-NEXT:    clflushopt (%rdi)
+; ZNVER1-NEXT:    clflushopt (%rdi) # sched: [8:0.50]
 ; ZNVER1-NEXT:    retq # sched: [1:0.50]
   tail call void @llvm.x86.clflushopt(i8* %p)
   ret void