Skip to content

Commit 7c18195

Browse files
author
Rin Dobrescu
authored
[AArch64] Add flag setting instructions to scheduling model. (#96880)
Some flag setting instructions (such as ANDS, ADDS, CCMN) were missing from the V2 scheduling model. This patch adds them in.
1 parent 6334d0a commit 7c18195

File tree

2 files changed

+81
-70
lines changed

2 files changed

+81
-70
lines changed

llvm/lib/Target/AArch64/AArch64SchedNeoverseV2.td

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1108,12 +1108,17 @@ def : InstRW<[V2Write_1cyc_1B_1R], (instrs BL, BLR)>;
11081108
// ALU, basic
11091109
// ALU, basic, flagset
11101110
def : SchedAlias<WriteI, V2Write_1cyc_1I>;
1111-
def : InstRW<[V2Write_1cyc_1F], (instregex "^(ADC|SBC)S[WX]r$")>;
1111+
def : InstRW<[V2Write_1cyc_1F], (instregex "^(ADD|SUB)S[WX]r[ir]$",
1112+
"^(ADC|SBC)S[WX]r$",
1113+
"^ANDS[WX]ri$")>;
11121114
def : InstRW<[V2Write_0or1cyc_1I], (instregex "^MOVZ[WX]i$")>;
11131115

11141116
// ALU, extend and shift
11151117
def : SchedAlias<WriteIEReg, V2Write_2cyc_1M>;
11161118

1119+
// Conditional compare
1120+
def : InstRW<[V2Write_1cyc_1F], (instregex "^CCM[NP][WX][ir]")>;
1121+
11171122
// Arithmetic, LSL shift, shift <= 4
11181123
// Arithmetic, flagset, LSL shift, shift <= 4
11191124
// Arithmetic, LSR/ASR/ROR shift or LSL shift > 4

0 commit comments

Comments
 (0)