From: Craig Topper Date: Mon, 19 Mar 2018 19:00:29 +0000 (+0000) Subject: [X86] Correct regular expression in Zen scheduler model that was excluding JECXZ... X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=afabf36505542776a2a2b4e70c91687b163b45aa;p=platform%2Fupstream%2Fllvm.git [X86] Correct regular expression in Zen scheduler model that was excluding JECXZ instruction. The regex was looking for JECXZ_32 or JECXZ_64, but their is just one instruction called JECXZ. They used to exist as separate instructions, but were merged over 3 years ago. llvm-svn: 327880 --- diff --git a/llvm/lib/Target/X86/X86ScheduleZnver1.td b/llvm/lib/Target/X86/X86ScheduleZnver1.td index c43dae4..6b867c5 100644 --- a/llvm/lib/Target/X86/X86ScheduleZnver1.td +++ b/llvm/lib/Target/X86/X86ScheduleZnver1.td @@ -474,7 +474,7 @@ def : InstRW<[ZnWriteDiv64], (instregex "DIV64r", "IDIV64r")>; // J(E|R)CXZ. def ZnWriteJCXZ : SchedWriteRes<[ZnALU03]>; -def : InstRW<[ZnWriteJCXZ], (instregex "JCXZ", "JECXZ_(32|64)", "JRCXZ")>; +def : InstRW<[ZnWriteJCXZ], (instrs JCXZ, JECXZ, JRCXZ)>; // INTO def : InstRW<[WriteMicrocoded], (instregex "INTO")>; diff --git a/llvm/test/CodeGen/X86/schedule-x86_32.ll b/llvm/test/CodeGen/X86/schedule-x86_32.ll index 1179300..601b423 100644 --- a/llvm/test/CodeGen/X86/schedule-x86_32.ll +++ b/llvm/test/CodeGen/X86/schedule-x86_32.ll @@ -1348,7 +1348,7 @@ define void @test_jcxz_jecxz() optsize { ; ZNVER1-NEXT: #APP ; ZNVER1-NEXT: JXTGT: ; ZNVER1-NEXT: jcxz JXTGT # sched: [1:0.50] -; ZNVER1-NEXT: jecxz JXTGT # sched: [1:0.25] +; ZNVER1-NEXT: jecxz JXTGT # sched: [1:0.50] ; ZNVER1-NEXT: #NO_APP ; ZNVER1-NEXT: retl # sched: [1:0.50] call void asm sideeffect "JXTGT: \0A\09 jcxz JXTGT \0A\09 jecxz JXTGT", ""() diff --git a/llvm/test/CodeGen/X86/schedule-x86_64.ll b/llvm/test/CodeGen/X86/schedule-x86_64.ll index 0ee3b33..0197252 100644 --- a/llvm/test/CodeGen/X86/schedule-x86_64.ll +++ b/llvm/test/CodeGen/X86/schedule-x86_64.ll @@ -7279,7 +7279,7 @@ define void @test_jecxz_jrcxz() optsize { ; ZNVER1: # %bb.0: ; ZNVER1-NEXT: #APP ; ZNVER1-NEXT: JXTGT: -; ZNVER1-NEXT: jecxz JXTGT # sched: [1:0.25] +; ZNVER1-NEXT: jecxz JXTGT # sched: [1:0.50] ; ZNVER1-NEXT: jrcxz JXTGT # sched: [1:0.50] ; ZNVER1-NEXT: #NO_APP ; ZNVER1-NEXT: retq # sched: [1:0.50]