@@ -125,8 +125,9 @@ def : InstRW<[WriteNoop], (instregex "(t)?BKPT$", "(t2)?CDP(2)?$",
125
125
"(t2)?CPS[123]p$", "(t2)?DBG$", "(t2)?DMB$", "(t2)?DSB$", "ERET$",
126
126
"(t2|t)?HINT$", "(t)?HLT$", "(t2)?HVC$", "(t2)?ISB$", "ITasm$",
127
127
"(t2)?RFE(DA|DB|IA|IB)", "(t)?SETEND", "(t2)?SETPAN", "(t2)?SMC", "SPACE",
128
- "(t2)?SRS(DA|DB|IA|IB)", "SWP(B)?", "t?TRAP", "UDF$", "t2DCPS", "t2SG",
129
- "t2TT", "tCPS", "CMP_SWAP", "t?SVC", "t2IT", "CompilerBarrier")>;
128
+ "(t2)?SRS(DA|DB|IA|IB)", "SWP(B)?", "t?TRAP", "(t2|t)?UDF$", "t2DCPS", "t2SG",
129
+ "t2TT", "tCPS", "CMP_SWAP", "t?SVC", "t2IT", "CompilerBarrier",
130
+ "t__brkdiv0")>;
130
131
131
132
def : InstRW<[WriteNoop], (instregex "VMRS", "VMSR", "FMSTAT")>;
132
133
@@ -146,7 +147,7 @@ def : InstRW<[WriteNoop], (instregex "FLDM", "FSTM")>;
146
147
// Pseudos
147
148
def : InstRW<[WriteNoop], (instregex "(t2)?ABS$",
148
149
"(t)?ADJCALLSTACKDOWN$", "(t)?ADJCALLSTACKUP$", "(t2|t)?Int_eh_sjlj",
149
- "tLDRpci_pic", "t2SUBS_PC_LR ",
150
+ "tLDRpci_pic", "(t2)?SUBS_PC_LR ",
150
151
"JUMPTABLE", "tInt_WIN_eh_sjlj_longjmp",
151
152
"VLD(1|2)LN(d|q)(WB_fixed_|WB_register_)?Asm",
152
153
"VLD(3|4)(DUP|LN)?(d|q)(WB_fixed_|WB_register_)?Asm",
@@ -279,6 +280,9 @@ def A57WriteMLA : SchedWriteRes<[A57UnitM]> { let Latency = 3; }
279
280
def A57WriteMLAL : SchedWriteRes<[A57UnitM]> { let Latency = 4; }
280
281
def A57ReadMLA : SchedReadAdvance<2, [A57WriteMLA, A57WriteMLAL]>;
281
282
283
+ def : InstRW<[A57WriteMLA],
284
+ (instregex "t2SMLAD", "t2SMLADX", "t2SMLSD", "t2SMLSDX")>;
285
+
282
286
def : SchedAlias<WriteMAC16, A57WriteMLA>;
283
287
def : SchedAlias<WriteMAC32, A57WriteMLA>;
284
288
def : SchedAlias<ReadMAC, A57ReadMLA>;
@@ -587,6 +591,8 @@ def : InstRW<[A57WriteLDM], (instregex "(t|t2|sys)?LDM(IA|DA|DB|IB)$")>;
587
591
def : InstRW<[A57WriteLDM_Upd],
588
592
(instregex "(t|t2|sys)?LDM(IA_UPD|DA_UPD|DB_UPD|IB_UPD|IA_RET)", "tPOP")>;
589
593
594
+ def : InstRW<[A57Write_5cyc_1L], (instregex "VLLDM")>;
595
+
590
596
// --- 3.9 Store Instructions ---
591
597
592
598
// Store, immed offset
@@ -705,6 +711,8 @@ def : InstRW<[A57WriteSTM], (instregex "(t2|sys|t)?STM(IA|DA|DB|IB)$")>;
705
711
def : InstRW<[A57WrBackOne, A57WriteSTM_Upd],
706
712
(instregex "(t2|sys|t)?STM(IA_UPD|DA_UPD|DB_UPD|IB_UPD)", "tPUSH")>;
707
713
714
+ def : InstRW<[A57Write_5cyc_1S], (instregex "VLSTM")>;
715
+
708
716
// --- 3.10 FP Data Processing Instructions ---
709
717
def : SchedAlias<WriteFPALU32, A57Write_5cyc_1V>;
710
718
def : SchedAlias<WriteFPALU64, A57Write_5cyc_1V>;
@@ -722,9 +730,11 @@ def : InstRW<[A57WriteVcmp],
722
730
// fp convert
723
731
def : InstRW<[A57Write_5cyc_1V], (instregex
724
732
"VCVT(A|N|P|M)(SH|UH|SS|US|SD|UD)", "VCVT(BDH|THD|TDH)")>;
725
-
733
+ def : InstRW<[A57Write_5cyc_1V], (instregex "VTOSLS", "VTOUHS", "VTOULS")>;
726
734
def : SchedAlias<WriteFPCVT, A57Write_5cyc_1V>;
727
735
736
+ def : InstRW<[A57Write_5cyc_1V], (instregex "VJCVT")>;
737
+
728
738
// FP round to integral
729
739
def : InstRW<[A57Write_5cyc_1V], (instregex "VRINT(A|N|P|M|Z|R|X)(H|S|D)$")>;
730
740
@@ -734,6 +744,8 @@ def : SchedAlias<WriteFPDIV64, A57Write_32cyc_1W>;
734
744
def : SchedAlias<WriteFPSQRT32, A57Write_17cyc_1W>;
735
745
def : SchedAlias<WriteFPSQRT64, A57Write_32cyc_1W>;
736
746
747
+ def : InstRW<[A57Write_17cyc_1W], (instregex "VSQRTH")>;
748
+
737
749
// FP max/min
738
750
def : InstRW<[A57Write_5cyc_1V], (instregex "VMAX", "VMIN")>;
739
751
@@ -767,6 +779,13 @@ def : SchedAlias<WriteFPMAC32, A57WriteVFMA>;
767
779
def : SchedAlias<WriteFPMAC64, A57WriteVFMA>;
768
780
def : SchedAlias<ReadFPMAC, A57ReadVFMA5>;
769
781
782
+ // VMLAH/VMLSH are not binded to scheduling classes by default, so here custom:
783
+ def : InstRW<[A57WriteVFMA, A57ReadVFMA5, ReadFPMUL, ReadFPMUL],
784
+ (instregex "VMLAH", "VMLSH", "VNMLAH", "VNMLSH")>;
785
+
786
+ def : InstRW<[A57WriteVMUL],
787
+ (instregex "VUDOTD", "VSDOTD", "VUDOTQ", "VSDOTQ")>;
788
+
770
789
def : InstRW<[A57Write_3cyc_1V], (instregex "VNEG")>;
771
790
def : InstRW<[A57Write_3cyc_1V], (instregex "VSEL")>;
772
791
@@ -775,6 +794,8 @@ def : InstRW<[A57Write_3cyc_1V], (instregex "VSEL")>;
775
794
def : InstRW<[A57Write_3cyc_1V], (instregex "FCONST(D|S|H)")>;
776
795
def : InstRW<[A57Write_3cyc_1V], (instregex "VMOV(D|S|H)(cc)?$")>;
777
796
797
+ def : InstRW<[A57Write_3cyc_1V], (instregex "VINSH")>;
798
+
778
799
// 5cyc L for FP transfer, vfp to core reg,
779
800
// 5cyc L for FP transfer, core reg to vfp
780
801
def : SchedAlias<WriteFPMOV, A57Write_5cyc_1L>;
@@ -1062,6 +1083,11 @@ def A57ReadVQDMLAL_VecInt : SchedReadVariant<[
1062
1083
def : InstRW<[A57WriteVQDMLAL_VecInt, A57ReadVQDMLAL_VecInt],
1063
1084
(instregex "VQDMLAL", "VQDMLSL")>;
1064
1085
1086
+ // Vector Saturating Rounding Doubling Multiply Accumulate/Subtract Long
1087
+ // Scheduling info from VQDMLAL/VQDMLSL
1088
+ def : InstRW<[A57WriteVQDMLAL_VecInt, A57ReadVQDMLAL_VecInt],
1089
+ (instregex "VQRDMLAH", "VQRDMLSH")>;
1090
+
1065
1091
// ASIMD multiply long
1066
1092
// 5cyc F0 for r0px, 4cyc F0 for r1p0 and later
1067
1093
def A57WriteVMULL_VecInt : SchedWriteVariant<[
@@ -1126,6 +1152,8 @@ def : InstRW<[A57Write_3cyc_1V], (instregex "VABS(fd|fq|hd|hq)")>;
1126
1152
def : InstRW<[A57Write_5cyc_1V], (instregex "VABD(fd|fq|hd|hq)",
1127
1153
"VADD(fd|fq|hd|hq)", "VPADD(f|h)", "VSUB(fd|fq|hd|hq)")>;
1128
1154
1155
+ def : InstRW<[A57Write_5cyc_1V], (instregex "VCADD", "VCMLA")>;
1156
+
1129
1157
// ASIMD FP compare
1130
1158
def : InstRW<[A57Write_5cyc_1V], (instregex "VAC(GE|GT|LE|LT)",
1131
1159
"VC(EQ|GE|GT|LE)(fd|fq|hd|hq)")>;
@@ -1184,7 +1212,7 @@ def : InstRW<[A57Write_3cyc_1V], (instregex "VEXT(d|q)(8|16|32|64)")>;
1184
1212
// ASIMD move, immed
1185
1213
def : InstRW<[A57Write_3cyc_1V], (instregex
1186
1214
"VMOV(v8i8|v16i8|v4i16|v8i16|v2i32|v4i32|v1i64|v2i64|v2f32|v4f32)",
1187
- "VMOVQ0")>;
1215
+ "VMOVD0", " VMOVQ0")>;
1188
1216
1189
1217
// ASIMD move, narrowing
1190
1218
def : InstRW<[A57Write_3cyc_1V], (instregex "VMOVN")>;
0 commit comments