From c32b942653a12fa42cf60f4df93490bfa7e3615d Mon Sep 17 00:00:00 2001 From: Simon Pilgrim Date: Tue, 28 Nov 2017 23:25:42 +0000 Subject: [PATCH] [X86] Tag CLFLUSHOPT with same scheduling behaviour as CLFLUSH git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@319253 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Target/X86/X86InstrInfo.td | 5 +++-- test/CodeGen/X86/clflushopt-schedule.ll | 4 ++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/lib/Target/X86/X86InstrInfo.td b/lib/Target/X86/X86InstrInfo.td index 0a6f93bbc23..4a3d36557d3 100644 --- a/lib/Target/X86/X86InstrInfo.td +++ b/lib/Target/X86/X86InstrInfo.td @@ -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", diff --git a/test/CodeGen/X86/clflushopt-schedule.ll b/test/CodeGen/X86/clflushopt-schedule.ll index 57f9ee1b25e..3ba02f0a66e 100644 --- a/test/CodeGen/X86/clflushopt-schedule.ll +++ b/test/CodeGen/X86/clflushopt-schedule.ll @@ -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 -- 2.50.1