209
209
//===----------------------------------------------------------------------===//
211
211
//===----------------------------------------------------------------------===//
213
// These absolute set addressing mode instructions accept immediate as
214
// an operand. We have duplicated these patterns to take global address.
216
let isExtended = 1, opExtendable = 2, neverHasSideEffects = 1,
217
validSubTargets = HasV4SubT in {
218
def LDrid_abs_setimm_V4 : LDInst2<(outs DoubleRegs:$dst1, IntRegs:$dst2),
219
(ins u0AlwaysExt:$addr),
220
"$dst1 = memd($dst2=##$addr)",
225
def LDrib_abs_setimm_V4 : LDInst2<(outs IntRegs:$dst1, IntRegs:$dst2),
226
(ins u0AlwaysExt:$addr),
227
"$dst1 = memb($dst2=##$addr)",
232
def LDrih_abs_setimm_V4 : LDInst2<(outs IntRegs:$dst1, IntRegs:$dst2),
233
(ins u0AlwaysExt:$addr),
234
"$dst1 = memh($dst2=##$addr)",
239
def LDriub_abs_setimm_V4 : LDInst2<(outs IntRegs:$dst1, IntRegs:$dst2),
240
(ins u0AlwaysExt:$addr),
241
"$dst1 = memub($dst2=##$addr)",
246
def LDriuh_abs_setimm_V4 : LDInst2<(outs IntRegs:$dst1, IntRegs:$dst2),
247
(ins u0AlwaysExt:$addr),
248
"$dst1 = memuh($dst2=##$addr)",
253
def LDriw_abs_setimm_V4 : LDInst2<(outs IntRegs:$dst1, IntRegs:$dst2),
254
(ins u0AlwaysExt:$addr),
255
"$dst1 = memw($dst2=##$addr)",
260
// Following patterns are defined for absolute set addressing mode
261
// instruction which take global address as operand.
262
let isExtended = 1, opExtendable = 2, neverHasSideEffects = 1,
263
validSubTargets = HasV4SubT in {
264
def LDrid_abs_set_V4 : LDInst2<(outs DoubleRegs:$dst1, IntRegs:$dst2),
265
(ins globaladdressExt:$addr),
266
"$dst1 = memd($dst2=##$addr)",
271
def LDrib_abs_set_V4 : LDInst2<(outs IntRegs:$dst1, IntRegs:$dst2),
272
(ins globaladdressExt:$addr),
273
"$dst1 = memb($dst2=##$addr)",
278
def LDrih_abs_set_V4 : LDInst2<(outs IntRegs:$dst1, IntRegs:$dst2),
279
(ins globaladdressExt:$addr),
280
"$dst1 = memh($dst2=##$addr)",
285
def LDriub_abs_set_V4 : LDInst2<(outs IntRegs:$dst1, IntRegs:$dst2),
286
(ins globaladdressExt:$addr),
287
"$dst1 = memub($dst2=##$addr)",
292
def LDriuh_abs_set_V4 : LDInst2<(outs IntRegs:$dst1, IntRegs:$dst2),
293
(ins globaladdressExt:$addr),
294
"$dst1 = memuh($dst2=##$addr)",
299
def LDriw_abs_set_V4 : LDInst2<(outs IntRegs:$dst1, IntRegs:$dst2),
300
(ins globaladdressExt:$addr),
301
"$dst1 = memw($dst2=##$addr)",
212
//===----------------------------------------------------------------------===//
213
// Template class for load instructions with Absolute set addressing mode.
214
//===----------------------------------------------------------------------===//
215
let isExtended = 1, opExtendable = 2, neverHasSideEffects = 1,
216
validSubTargets = HasV4SubT, addrMode = AbsoluteSet in
217
class T_LD_abs_set<string mnemonic, RegisterClass RC>:
218
LDInst2<(outs RC:$dst1, IntRegs:$dst2),
219
(ins u0AlwaysExt:$addr),
220
"$dst1 = "#mnemonic#"($dst2=##$addr)",
224
def LDrid_abs_set_V4 : T_LD_abs_set <"memd", DoubleRegs>;
225
def LDrib_abs_set_V4 : T_LD_abs_set <"memb", IntRegs>;
226
def LDriub_abs_set_V4 : T_LD_abs_set <"memub", IntRegs>;
227
def LDrih_abs_set_V4 : T_LD_abs_set <"memh", IntRegs>;
228
def LDriw_abs_set_V4 : T_LD_abs_set <"memw", IntRegs>;
229
def LDriuh_abs_set_V4 : T_LD_abs_set <"memuh", IntRegs>;
306
232
// multiclass for load instructions with base + register offset
307
233
// addressing mode
528
465
//===----------------------------------------------------------------------===//
530
/// Assumptions::: ****** DO NOT IGNORE ********
531
/// 1. Make sure that in post increment store, the zero'th operand is always the
532
/// post increment operand.
533
/// 2. Make sure that the store value operand(Rt/Rtt) in a store is always the
538
let isExtended = 1, opExtendable = 2, validSubTargets = HasV4SubT in {
539
def STrid_abs_setimm_V4 : STInst2<(outs IntRegs:$dst1),
540
(ins DoubleRegs:$src1, u0AlwaysExt:$src2),
541
"memd($dst1=##$src2) = $src1",
546
def STrib_abs_setimm_V4 : STInst2<(outs IntRegs:$dst1),
547
(ins IntRegs:$src1, u0AlwaysExt:$src2),
548
"memb($dst1=##$src2) = $src1",
553
def STrih_abs_setimm_V4 : STInst2<(outs IntRegs:$dst1),
554
(ins IntRegs:$src1, u0AlwaysExt:$src2),
555
"memh($dst1=##$src2) = $src1",
560
def STriw_abs_setimm_V4 : STInst2<(outs IntRegs:$dst1),
561
(ins IntRegs:$src1, u0AlwaysExt:$src2),
562
"memw($dst1=##$src2) = $src1",
568
let isExtended = 1, opExtendable = 2, validSubTargets = HasV4SubT in {
569
def STrid_abs_set_V4 : STInst2<(outs IntRegs:$dst1),
570
(ins DoubleRegs:$src1, globaladdressExt:$src2),
571
"memd($dst1=##$src2) = $src1",
576
def STrib_abs_set_V4 : STInst2<(outs IntRegs:$dst1),
577
(ins IntRegs:$src1, globaladdressExt:$src2),
578
"memb($dst1=##$src2) = $src1",
583
def STrih_abs_set_V4 : STInst2<(outs IntRegs:$dst1),
584
(ins IntRegs:$src1, globaladdressExt:$src2),
585
"memh($dst1=##$src2) = $src1",
590
def STriw_abs_set_V4 : STInst2<(outs IntRegs:$dst1),
591
(ins IntRegs:$src1, globaladdressExt:$src2),
592
"memw($dst1=##$src2) = $src1",
467
//===----------------------------------------------------------------------===//
468
// Template class for store instructions with Absolute set addressing mode.
469
//===----------------------------------------------------------------------===//
470
let isExtended = 1, opExtendable = 2, validSubTargets = HasV4SubT,
471
addrMode = AbsoluteSet in
472
class T_ST_abs_set<string mnemonic, RegisterClass RC>:
473
STInst2<(outs IntRegs:$dst1),
474
(ins RC:$src1, u0AlwaysExt:$src2),
475
mnemonic#"($dst1=##$src2) = $src1",
479
def STrid_abs_set_V4 : T_ST_abs_set <"memd", DoubleRegs>;
480
def STrib_abs_set_V4 : T_ST_abs_set <"memb", IntRegs>;
481
def STrih_abs_set_V4 : T_ST_abs_set <"memh", IntRegs>;
482
def STriw_abs_set_V4 : T_ST_abs_set <"memw", IntRegs>;
484
//===----------------------------------------------------------------------===//
597
485
// multiclass for store instructions with base + register offset addressing
487
//===----------------------------------------------------------------------===//
599
488
multiclass ST_Idxd_shl_Pbase<string mnemonic, RegisterClass RC, bit isNot,
601
490
let isPredicatedNew = isPredNew in
711
603
u2ImmPred:$src3, DoubleRegs:$src4)>;
714
// memd(Ru<<#u2+#U6)=Rtt
715
let isExtended = 1, opExtendable = 2, AddedComplexity = 10,
716
validSubTargets = HasV4SubT in
717
def STrid_shl_V4 : STInst<(outs),
718
(ins IntRegs:$src1, u2Imm:$src2, u0AlwaysExt:$src3, DoubleRegs:$src4),
719
"memd($src1<<#$src2+#$src3) = $src4",
720
[(store (i64 DoubleRegs:$src4),
606
let isExtended = 1, opExtendable = 2 in
607
class T_ST_LongOff <string mnemonic, PatFrag stOp, RegisterClass RC, ValueType VT> :
609
(ins IntRegs:$src1, u2Imm:$src2, u0AlwaysExt:$src3, RC:$src4),
610
mnemonic#"($src1<<#$src2+##$src3) = $src4",
611
[(stOp (VT RC:$src4),
721
612
(add (shl (i32 IntRegs:$src1), u2ImmPred:$src2),
722
613
u0AlwaysExtPred:$src3))]>,
723
614
Requires<[HasV4T]>;
616
let isExtended = 1, opExtendable = 2, mayStore = 1, isNVStore = 1 in
617
class T_ST_LongOff_nv <string mnemonic> :
619
(ins IntRegs:$src1, u2Imm:$src2, u0AlwaysExt:$src3, IntRegs:$src4),
620
mnemonic#"($src1<<#$src2+##$src3) = $src4.new",
624
multiclass ST_LongOff <string mnemonic, string BaseOp, PatFrag stOp> {
625
let BaseOpcode = BaseOp#"_shl" in {
626
let isNVStorable = 1 in
627
def NAME#_V4 : T_ST_LongOff<mnemonic, stOp, IntRegs, i32>;
629
def NAME#_nv_V4 : T_ST_LongOff_nv<mnemonic>;
633
let AddedComplexity = 10, validSubTargets = HasV4SubT in {
634
def STrid_shl_V4 : T_ST_LongOff<"memd", store, DoubleRegs, i64>;
635
defm STrib_shl : ST_LongOff <"memb", "STrib", truncstorei8>, NewValueRel;
636
defm STrih_shl : ST_LongOff <"memh", "Strih", truncstorei16>, NewValueRel;
637
defm STriw_shl : ST_LongOff <"memw", "STriw", store>, NewValueRel;
640
let AddedComplexity = 40 in
641
multiclass T_ST_LOff_Pats <InstHexagon I, RegisterClass RC, ValueType VT,
643
def : Pat<(stOp (VT RC:$src4),
644
(add (shl IntRegs:$src1, u2ImmPred:$src2),
645
(NumUsesBelowThresCONST32 tglobaladdr:$src3))),
646
(I IntRegs:$src1, u2ImmPred:$src2, tglobaladdr:$src3, RC:$src4)>;
648
def : Pat<(stOp (VT RC:$src4),
650
(NumUsesBelowThresCONST32 tglobaladdr:$src3))),
651
(I IntRegs:$src1, 0, tglobaladdr:$src3, RC:$src4)>;
654
defm : T_ST_LOff_Pats<STrid_shl_V4, DoubleRegs, i64, store>;
655
defm : T_ST_LOff_Pats<STriw_shl_V4, IntRegs, i32, store>;
656
defm : T_ST_LOff_Pats<STrib_shl_V4, IntRegs, i32, truncstorei8>;
657
defm : T_ST_LOff_Pats<STrih_shl_V4, IntRegs, i32, truncstorei16>;
725
659
// memd(Rx++#s4:3)=Rtt
726
660
// memd(Rx++#s4:3:circ(Mu))=Rtt
727
661
// memd(Rx++I:circ(Mu))=Rtt
1109
998
//===----------------------------------------------------------------------===//
1111
multiclass NVJ_type_basic_reg<string NotStr, string OpcStr, string TakenStr> {
1112
def _ie_nv_V4 : NVInst_V4<(outs),
1113
(ins IntRegs:$src1, IntRegs:$src2, brtarget:$offset),
1114
!strconcat("if (", !strconcat(NotStr, !strconcat(OpcStr,
1115
!strconcat("($src1.new, $src2)) jump:",
1116
!strconcat(TakenStr, " $offset"))))),
1120
def _nv_V4 : NVInst_V4<(outs),
1121
(ins IntRegs:$src1, IntRegs:$src2, brtarget:$offset),
1122
!strconcat("if (", !strconcat(NotStr, !strconcat(OpcStr,
1123
!strconcat("($src1.new, $src2)) jump:",
1124
!strconcat(TakenStr, " $offset"))))),
1129
multiclass NVJ_type_basic_2ndDotNew<string NotStr, string OpcStr,
1131
def _ie_nv_V4 : NVInst_V4<(outs),
1132
(ins IntRegs:$src1, IntRegs:$src2, brtarget:$offset),
1133
!strconcat("if (", !strconcat(NotStr, !strconcat(OpcStr,
1134
!strconcat("($src1, $src2.new)) jump:",
1135
!strconcat(TakenStr, " $offset"))))),
1139
def _nv_V4 : NVInst_V4<(outs),
1140
(ins IntRegs:$src1, IntRegs:$src2, brtarget:$offset),
1141
!strconcat("if (", !strconcat(NotStr, !strconcat(OpcStr,
1142
!strconcat("($src1, $src2.new)) jump:",
1143
!strconcat(TakenStr, " $offset"))))),
1148
multiclass NVJ_type_basic_imm<string NotStr, string OpcStr, string TakenStr> {
1149
def _ie_nv_V4 : NVInst_V4<(outs),
1150
(ins IntRegs:$src1, u5Imm:$src2, brtarget:$offset),
1151
!strconcat("if (", !strconcat(NotStr, !strconcat(OpcStr,
1152
!strconcat("($src1.new, #$src2)) jump:",
1153
!strconcat(TakenStr, " $offset"))))),
1157
def _nv_V4 : NVInst_V4<(outs),
1158
(ins IntRegs:$src1, u5Imm:$src2, brtarget:$offset),
1159
!strconcat("if (", !strconcat(NotStr, !strconcat(OpcStr,
1160
!strconcat("($src1.new, #$src2)) jump:",
1161
!strconcat(TakenStr, " $offset"))))),
1166
multiclass NVJ_type_basic_neg<string NotStr, string OpcStr, string TakenStr> {
1167
def _ie_nv_V4 : NVInst_V4<(outs),
1168
(ins IntRegs:$src1, nOneImm:$src2, brtarget:$offset),
1169
!strconcat("if (", !strconcat(NotStr, !strconcat(OpcStr,
1170
!strconcat("($src1.new, #$src2)) jump:",
1171
!strconcat(TakenStr, " $offset"))))),
1175
def _nv_V4 : NVInst_V4<(outs),
1176
(ins IntRegs:$src1, nOneImm:$src2, brtarget:$offset),
1177
!strconcat("if (", !strconcat(NotStr, !strconcat(OpcStr,
1178
!strconcat("($src1.new, #$src2)) jump:",
1179
!strconcat(TakenStr, " $offset"))))),
1184
multiclass NVJ_type_basic_tstbit<string NotStr, string OpcStr,
1186
def _ie_nv_V4 : NVInst_V4<(outs),
1187
(ins IntRegs:$src1, u1Imm:$src2, brtarget:$offset),
1188
!strconcat("if (", !strconcat(NotStr, !strconcat(OpcStr,
1189
!strconcat("($src1.new, #$src2)) jump:",
1190
!strconcat(TakenStr, " $offset"))))),
1194
def _nv_V4 : NVInst_V4<(outs),
1195
(ins IntRegs:$src1, u1Imm:$src2, brtarget:$offset),
1196
!strconcat("if (", !strconcat(NotStr, !strconcat(OpcStr,
1197
!strconcat("($src1.new, #$src2)) jump:",
1198
!strconcat(TakenStr, " $offset"))))),
1203
// Multiclass for regular dot new of Ist operand register.
1204
multiclass NVJ_type_br_pred_reg<string NotStr, string OpcStr> {
1205
defm Pt : NVJ_type_basic_reg<NotStr, OpcStr, "t">;
1206
defm Pnt : NVJ_type_basic_reg<NotStr, OpcStr, "nt">;
1209
// Multiclass for dot new of 2nd operand register.
1210
multiclass NVJ_type_br_pred_2ndDotNew<string NotStr, string OpcStr> {
1211
defm Pt : NVJ_type_basic_2ndDotNew<NotStr, OpcStr, "t">;
1212
defm Pnt : NVJ_type_basic_2ndDotNew<NotStr, OpcStr, "nt">;
1215
// Multiclass for 2nd operand immediate, including -1.
1216
multiclass NVJ_type_br_pred_imm<string NotStr, string OpcStr> {
1217
defm Pt : NVJ_type_basic_imm<NotStr, OpcStr, "t">;
1218
defm Pnt : NVJ_type_basic_imm<NotStr, OpcStr, "nt">;
1219
defm Ptneg : NVJ_type_basic_neg<NotStr, OpcStr, "t">;
1220
defm Pntneg : NVJ_type_basic_neg<NotStr, OpcStr, "nt">;
1223
// Multiclass for 2nd operand immediate, excluding -1.
1224
multiclass NVJ_type_br_pred_imm_only<string NotStr, string OpcStr> {
1225
defm Pt : NVJ_type_basic_imm<NotStr, OpcStr, "t">;
1226
defm Pnt : NVJ_type_basic_imm<NotStr, OpcStr, "nt">;
1229
// Multiclass for tstbit, where 2nd operand is always #0.
1230
multiclass NVJ_type_br_pred_tstbit<string NotStr, string OpcStr> {
1231
defm Pt : NVJ_type_basic_tstbit<NotStr, OpcStr, "t">;
1232
defm Pnt : NVJ_type_basic_tstbit<NotStr, OpcStr, "nt">;
1235
// Multiclass for GT.
1236
multiclass NVJ_type_rr_ri<string OpcStr> {
1237
defm rrNot : NVJ_type_br_pred_reg<"!", OpcStr>;
1238
defm rr : NVJ_type_br_pred_reg<"", OpcStr>;
1239
defm rrdnNot : NVJ_type_br_pred_2ndDotNew<"!", OpcStr>;
1240
defm rrdn : NVJ_type_br_pred_2ndDotNew<"", OpcStr>;
1241
defm riNot : NVJ_type_br_pred_imm<"!", OpcStr>;
1242
defm ri : NVJ_type_br_pred_imm<"", OpcStr>;
1245
// Multiclass for EQ.
1246
multiclass NVJ_type_rr_ri_no_2ndDotNew<string OpcStr> {
1247
defm rrNot : NVJ_type_br_pred_reg<"!", OpcStr>;
1248
defm rr : NVJ_type_br_pred_reg<"", OpcStr>;
1249
defm riNot : NVJ_type_br_pred_imm<"!", OpcStr>;
1250
defm ri : NVJ_type_br_pred_imm<"", OpcStr>;
1253
// Multiclass for GTU.
1254
multiclass NVJ_type_rr_ri_no_nOne<string OpcStr> {
1255
defm rrNot : NVJ_type_br_pred_reg<"!", OpcStr>;
1256
defm rr : NVJ_type_br_pred_reg<"", OpcStr>;
1257
defm rrdnNot : NVJ_type_br_pred_2ndDotNew<"!", OpcStr>;
1258
defm rrdn : NVJ_type_br_pred_2ndDotNew<"", OpcStr>;
1259
defm riNot : NVJ_type_br_pred_imm_only<"!", OpcStr>;
1260
defm ri : NVJ_type_br_pred_imm_only<"", OpcStr>;
1263
// Multiclass for tstbit.
1264
multiclass NVJ_type_r0<string OpcStr> {
1265
defm r0Not : NVJ_type_br_pred_tstbit<"!", OpcStr>;
1266
defm r0 : NVJ_type_br_pred_tstbit<"", OpcStr>;
1269
// Base Multiclass for New Value Jump.
1270
multiclass NVJ_type {
1271
defm GT : NVJ_type_rr_ri<"cmp.gt">;
1272
defm EQ : NVJ_type_rr_ri_no_2ndDotNew<"cmp.eq">;
1273
defm GTU : NVJ_type_rr_ri_no_nOne<"cmp.gtu">;
1274
defm TSTBIT : NVJ_type_r0<"tstbit">;
1277
let isBranch = 1, isTerminator=1, neverHasSideEffects = 1, Defs = [PC] in {
1278
defm JMP_ : NVJ_type;
1281
//===----------------------------------------------------------------------===//
1283
//===----------------------------------------------------------------------===//
1000
//===----------------------------------------------------------------------===//
1001
// multiclass/template class for the new-value compare jumps with the register
1003
//===----------------------------------------------------------------------===//
1005
let isExtendable = 1, opExtendable = 2, isExtentSigned = 1, opExtentBits = 11 in
1006
class NVJrr_template<string mnemonic, bits<3> majOp, bit NvOpNum,
1007
bit isNegCond, bit isTaken>
1009
(ins IntRegs:$src1, IntRegs:$src2, brtarget:$offset),
1010
"if ("#!if(isNegCond, "!","")#mnemonic#
1011
"($src1"#!if(!eq(NvOpNum, 0),".new, ",", ")#
1012
"$src2"#!if(!eq(NvOpNum, 1),".new))","))")#" jump:"
1013
#!if(isTaken, "t","nt")#" $offset",
1014
[]>, Requires<[HasV4T]> {
1018
bits<3> Ns; // New-Value Operand
1019
bits<5> RegOp; // Non New-Value Operand
1022
let isBrTaken = !if(isTaken, "true", "false");
1023
let isPredicatedFalse = isNegCond;
1025
let Ns = !if(!eq(NvOpNum, 0), src1{2-0}, src2{2-0});
1026
let RegOp = !if(!eq(NvOpNum, 0), src2, src1);
1028
let IClass = 0b0010;
1030
let Inst{25-23} = majOp;
1031
let Inst{22} = isNegCond;
1032
let Inst{18-16} = Ns;
1033
let Inst{13} = isTaken;
1034
let Inst{12-8} = RegOp;
1035
let Inst{21-20} = offset{10-9};
1036
let Inst{7-1} = offset{8-2};
1040
multiclass NVJrr_cond<string mnemonic, bits<3> majOp, bit NvOpNum,
1042
// Branch not taken:
1043
def _nt_V4: NVJrr_template<mnemonic, majOp, NvOpNum, isNegCond, 0>;
1045
def _t_V4: NVJrr_template<mnemonic, majOp, NvOpNum, isNegCond, 1>;
1048
// NvOpNum = 0 -> First Operand is a new-value Register
1049
// NvOpNum = 1 -> Second Operand is a new-value Register
1051
multiclass NVJrr_base<string mnemonic, string BaseOp, bits<3> majOp,
1053
let BaseOpcode = BaseOp#_NVJ in {
1054
defm _t_Jumpnv : NVJrr_cond<mnemonic, majOp, NvOpNum, 0>; // True cond
1055
defm _f_Jumpnv : NVJrr_cond<mnemonic, majOp, NvOpNum, 1>; // False cond
1059
// if ([!]cmp.eq(Ns.new,Rt)) jump:[n]t #r9:2
1060
// if ([!]cmp.gt(Ns.new,Rt)) jump:[n]t #r9:2
1061
// if ([!]cmp.gtu(Ns.new,Rt)) jump:[n]t #r9:2
1062
// if ([!]cmp.gt(Rt,Ns.new)) jump:[n]t #r9:2
1063
// if ([!]cmp.gtu(Rt,Ns.new)) jump:[n]t #r9:2
1065
let isPredicated = 1, isBranch = 1, isNewValue = 1, isTerminator = 1,
1066
Defs = [PC], neverHasSideEffects = 1, validSubTargets = HasV4SubT in {
1067
defm CMPEQrr : NVJrr_base<"cmp.eq", "CMPEQ", 0b000, 0>, PredRel;
1068
defm CMPGTrr : NVJrr_base<"cmp.gt", "CMPGT", 0b001, 0>, PredRel;
1069
defm CMPGTUrr : NVJrr_base<"cmp.gtu", "CMPGTU", 0b010, 0>, PredRel;
1070
defm CMPLTrr : NVJrr_base<"cmp.gt", "CMPLT", 0b011, 1>, PredRel;
1071
defm CMPLTUrr : NVJrr_base<"cmp.gtu", "CMPLTU", 0b100, 1>, PredRel;
1074
//===----------------------------------------------------------------------===//
1075
// multiclass/template class for the new-value compare jumps instruction
1076
// with a register and an unsigned immediate (U5) operand.
1077
//===----------------------------------------------------------------------===//
1079
let isExtendable = 1, opExtendable = 2, isExtentSigned = 1, opExtentBits = 11 in
1080
class NVJri_template<string mnemonic, bits<3> majOp, bit isNegCond,
1083
(ins IntRegs:$src1, u5Imm:$src2, brtarget:$offset),
1084
"if ("#!if(isNegCond, "!","")#mnemonic#"($src1.new, #$src2)) jump:"
1085
#!if(isTaken, "t","nt")#" $offset",
1086
[]>, Requires<[HasV4T]> {
1088
let isPredicatedFalse = isNegCond;
1089
let isBrTaken = !if(isTaken, "true", "false");
1095
let IClass = 0b0010;
1097
let Inst{25-23} = majOp;
1098
let Inst{22} = isNegCond;
1099
let Inst{18-16} = src1;
1100
let Inst{13} = isTaken;
1101
let Inst{12-8} = src2;
1102
let Inst{21-20} = offset{10-9};
1103
let Inst{7-1} = offset{8-2};
1106
multiclass NVJri_cond<string mnemonic, bits<3> majOp, bit isNegCond> {
1107
// Branch not taken:
1108
def _nt_V4: NVJri_template<mnemonic, majOp, isNegCond, 0>;
1110
def _t_V4: NVJri_template<mnemonic, majOp, isNegCond, 1>;
1113
multiclass NVJri_base<string mnemonic, string BaseOp, bits<3> majOp> {
1114
let BaseOpcode = BaseOp#_NVJri in {
1115
defm _t_Jumpnv : NVJri_cond<mnemonic, majOp, 0>; // True Cond
1116
defm _f_Jumpnv : NVJri_cond<mnemonic, majOp, 1>; // False cond
1120
// if ([!]cmp.eq(Ns.new,#U5)) jump:[n]t #r9:2
1121
// if ([!]cmp.gt(Ns.new,#U5)) jump:[n]t #r9:2
1122
// if ([!]cmp.gtu(Ns.new,#U5)) jump:[n]t #r9:2
1124
let isPredicated = 1, isBranch = 1, isNewValue = 1, isTerminator = 1,
1125
Defs = [PC], neverHasSideEffects = 1, validSubTargets = HasV4SubT in {
1126
defm CMPEQri : NVJri_base<"cmp.eq", "CMPEQ", 0b000>, PredRel;
1127
defm CMPGTri : NVJri_base<"cmp.gt", "CMPGT", 0b001>, PredRel;
1128
defm CMPGTUri : NVJri_base<"cmp.gtu", "CMPGTU", 0b010>, PredRel;
1131
//===----------------------------------------------------------------------===//
1132
// multiclass/template class for the new-value compare jumps instruction
1133
// with a register and an hardcoded 0/-1 immediate value.
1134
//===----------------------------------------------------------------------===//
1136
let isExtendable = 1, opExtendable = 1, isExtentSigned = 1, opExtentBits = 11 in
1137
class NVJ_ConstImm_template<string mnemonic, bits<3> majOp, string ImmVal,
1138
bit isNegCond, bit isTaken>
1140
(ins IntRegs:$src1, brtarget:$offset),
1141
"if ("#!if(isNegCond, "!","")#mnemonic
1142
#"($src1.new, #"#ImmVal#")) jump:"
1143
#!if(isTaken, "t","nt")#" $offset",
1144
[]>, Requires<[HasV4T]> {
1146
let isPredicatedFalse = isNegCond;
1147
let isBrTaken = !if(isTaken, "true", "false");
1151
let IClass = 0b0010;
1153
let Inst{25-23} = majOp;
1154
let Inst{22} = isNegCond;
1155
let Inst{18-16} = src1;
1156
let Inst{13} = isTaken;
1157
let Inst{21-20} = offset{10-9};
1158
let Inst{7-1} = offset{8-2};
1161
multiclass NVJ_ConstImm_cond<string mnemonic, bits<3> majOp, string ImmVal,
1163
// Branch not taken:
1164
def _nt_V4: NVJ_ConstImm_template<mnemonic, majOp, ImmVal, isNegCond, 0>;
1166
def _t_V4: NVJ_ConstImm_template<mnemonic, majOp, ImmVal, isNegCond, 1>;
1169
multiclass NVJ_ConstImm_base<string mnemonic, string BaseOp, bits<3> majOp,
1171
let BaseOpcode = BaseOp#_NVJ_ConstImm in {
1172
defm _t_Jumpnv : NVJ_ConstImm_cond<mnemonic, majOp, ImmVal, 0>; // True cond
1173
defm _f_Jumpnv : NVJ_ConstImm_cond<mnemonic, majOp, ImmVal, 1>; // False Cond
1177
// if ([!]tstbit(Ns.new,#0)) jump:[n]t #r9:2
1178
// if ([!]cmp.eq(Ns.new,#-1)) jump:[n]t #r9:2
1179
// if ([!]cmp.gt(Ns.new,#-1)) jump:[n]t #r9:2
1181
let isPredicated = 1, isBranch = 1, isNewValue = 1, isTerminator=1,
1182
Defs = [PC], neverHasSideEffects = 1 in {
1183
defm TSTBIT0 : NVJ_ConstImm_base<"tstbit", "TSTBIT", 0b011, "0">, PredRel;
1184
defm CMPEQn1 : NVJ_ConstImm_base<"cmp.eq", "CMPEQ", 0b100, "-1">, PredRel;
1185
defm CMPGTn1 : NVJ_ConstImm_base<"cmp.gt", "CMPGT", 0b101, "-1">, PredRel;
1285
1188
//===----------------------------------------------------------------------===//
3150
3067
(TFRI_V4 tblockaddress:$src1)>,
3151
3068
Requires<[HasV4T]>;
3153
let AddedComplexity=50, neverHasSideEffects = 1, isPredicated = 1 in
3070
let isExtended = 1, opExtendable = 2, AddedComplexity=50,
3071
neverHasSideEffects = 1, isPredicated = 1, validSubTargets = HasV4SubT in
3154
3072
def TFRI_cPt_V4 : ALU32_ri<(outs IntRegs:$dst),
3155
(ins PredRegs:$src1, globaladdress:$src2),
3156
"if($src1) $dst = ##$src2",
3073
(ins PredRegs:$src1, s16Ext:$src2),
3074
"if($src1) $dst = #$src2",
3158
3076
Requires<[HasV4T]>;
3160
let AddedComplexity=50, neverHasSideEffects = 1, isPredicated = 1 in
3078
let isExtended = 1, opExtendable = 2, AddedComplexity=50, isPredicatedFalse = 1,
3079
neverHasSideEffects = 1, isPredicated = 1, validSubTargets = HasV4SubT in
3161
3080
def TFRI_cNotPt_V4 : ALU32_ri<(outs IntRegs:$dst),
3162
(ins PredRegs:$src1, globaladdress:$src2),
3163
"if(!$src1) $dst = ##$src2",
3081
(ins PredRegs:$src1, s16Ext:$src2),
3082
"if(!$src1) $dst = #$src2",
3165
3084
Requires<[HasV4T]>;
3167
let AddedComplexity=50, neverHasSideEffects = 1, isPredicated = 1 in
3086
let isExtended = 1, opExtendable = 2, AddedComplexity=50,
3087
neverHasSideEffects = 1, isPredicated = 1, validSubTargets = HasV4SubT in
3168
3088
def TFRI_cdnPt_V4 : ALU32_ri<(outs IntRegs:$dst),
3169
(ins PredRegs:$src1, globaladdress:$src2),
3170
"if($src1.new) $dst = ##$src2",
3089
(ins PredRegs:$src1, s16Ext:$src2),
3090
"if($src1.new) $dst = #$src2",
3172
3092
Requires<[HasV4T]>;
3174
let AddedComplexity=50, neverHasSideEffects = 1, isPredicated = 1 in
3094
let isExtended = 1, opExtendable = 2, AddedComplexity=50, isPredicatedFalse = 1,
3095
neverHasSideEffects = 1, isPredicated = 1, validSubTargets = HasV4SubT in
3175
3096
def TFRI_cdnNotPt_V4 : ALU32_ri<(outs IntRegs:$dst),
3176
(ins PredRegs:$src1, globaladdress:$src2),
3177
"if(!$src1.new) $dst = ##$src2",
3097
(ins PredRegs:$src1, s16Ext:$src2),
3098
"if(!$src1.new) $dst = #$src2",
3179
3100
Requires<[HasV4T]>;
3181
3102
let AddedComplexity = 50, Predicates = [HasV4T] in
3182
3103
def : Pat<(HexagonCONST32_GP tglobaladdr:$src1),
3183
(TFRI_V4 tglobaladdr:$src1)>;
3104
(TFRI_V4 tglobaladdr:$src1)>,
3186
3108
// Load - Indirect with long offset: These instructions take global address
3187
3109
// as an operand
3188
let AddedComplexity = 10 in
3110
let isExtended = 1, opExtendable = 3, AddedComplexity = 40,
3111
validSubTargets = HasV4SubT in
3189
3112
def LDrid_ind_lo_V4 : LDInst<(outs DoubleRegs:$dst),
3190
(ins IntRegs:$src1, u2Imm:$src2, globaladdress:$offset),
3113
(ins IntRegs:$src1, u2Imm:$src2, globaladdressExt:$offset),
3191
3114
"$dst=memd($src1<<#$src2+##$offset)",
3192
3115
[(set (i64 DoubleRegs:$dst),
3193
3116
(load (add (shl IntRegs:$src1, u2ImmPred:$src2),
3194
3117
(HexagonCONST32 tglobaladdr:$offset))))]>,
3195
3118
Requires<[HasV4T]>;
3197
let AddedComplexity = 10 in
3120
let AddedComplexity = 40 in
3198
3121
multiclass LD_indirect_lo<string OpcStr, PatFrag OpNode> {
3122
let isExtended = 1, opExtendable = 3, validSubTargets = HasV4SubT in
3199
3123
def _lo_V4 : LDInst<(outs IntRegs:$dst),
3200
(ins IntRegs:$src1, u2Imm:$src2, globaladdress:$offset),
3124
(ins IntRegs:$src1, u2Imm:$src2, globaladdressExt:$offset),
3201
3125
!strconcat("$dst = ",
3202
3126
!strconcat(OpcStr, "($src1<<#$src2+##$offset)")),
3203
3127
[(set IntRegs:$dst,
3209
3133
defm LDrib_ind : LD_indirect_lo<"memb", sextloadi8>;
3210
3134
defm LDriub_ind : LD_indirect_lo<"memub", zextloadi8>;
3135
defm LDriub_ind_anyext : LD_indirect_lo<"memub", extloadi8>;
3211
3136
defm LDrih_ind : LD_indirect_lo<"memh", sextloadi16>;
3212
3137
defm LDriuh_ind : LD_indirect_lo<"memuh", zextloadi16>;
3138
defm LDriuh_ind_anyext : LD_indirect_lo<"memuh", extloadi16>;
3213
3139
defm LDriw_ind : LD_indirect_lo<"memw", load>;
3215
// Store - Indirect with long offset: These instructions take global address
3217
let AddedComplexity = 10 in
3218
def STrid_ind_lo_V4 : STInst<(outs),
3219
(ins IntRegs:$src1, u2Imm:$src2, globaladdress:$src3,
3221
"memd($src1<<#$src2+#$src3) = $src4",
3222
[(store (i64 DoubleRegs:$src4),
3223
(add (shl IntRegs:$src1, u2ImmPred:$src2),
3224
(HexagonCONST32 tglobaladdr:$src3)))]>,
3227
let AddedComplexity = 10 in
3228
multiclass ST_indirect_lo<string OpcStr, PatFrag OpNode> {
3229
def _lo_V4 : STInst<(outs),
3230
(ins IntRegs:$src1, u2Imm:$src2, globaladdress:$src3,
3232
!strconcat(OpcStr, "($src1<<#$src2+##$src3) = $src4"),
3233
[(OpNode (i32 IntRegs:$src4),
3234
(add (shl IntRegs:$src1, u2ImmPred:$src2),
3235
(HexagonCONST32 tglobaladdr:$src3)))]>,
3239
defm STrib_ind : ST_indirect_lo<"memb", truncstorei8>;
3240
defm STrih_ind : ST_indirect_lo<"memh", truncstorei16>;
3241
defm STriw_ind : ST_indirect_lo<"memw", store>;
3243
// Store - absolute addressing mode: These instruction take constant
3244
// value as the extended operand.
3245
multiclass ST_absimm<string OpcStr> {
3246
let isExtended = 1, opExtendable = 0, isPredicable = 1,
3247
validSubTargets = HasV4SubT in
3248
def _abs_V4 : STInst2<(outs),
3249
(ins u0AlwaysExt:$src1, IntRegs:$src2),
3250
!strconcat(OpcStr, "(##$src1) = $src2"),
3254
let isExtended = 1, opExtendable = 1, isPredicated = 1,
3255
validSubTargets = HasV4SubT in {
3256
def _abs_cPt_V4 : STInst2<(outs),
3257
(ins PredRegs:$src1, u0AlwaysExt:$src2, IntRegs:$src3),
3258
!strconcat("if ($src1)", !strconcat(OpcStr, "(##$src2) = $src3")),
3262
def _abs_cNotPt_V4 : STInst2<(outs),
3263
(ins PredRegs:$src1, u0AlwaysExt:$src2, IntRegs:$src3),
3264
!strconcat("if (!$src1)", !strconcat(OpcStr, "(##$src2) = $src3")),
3268
def _abs_cdnPt_V4 : STInst2<(outs),
3269
(ins PredRegs:$src1, u0AlwaysExt:$src2, IntRegs:$src3),
3270
!strconcat("if ($src1.new)",
3271
!strconcat(OpcStr, "(##$src2) = $src3")),
3275
def _abs_cdnNotPt_V4 : STInst2<(outs),
3276
(ins PredRegs:$src1, u0AlwaysExt:$src2, IntRegs:$src3),
3277
!strconcat("if (!$src1.new)",
3278
!strconcat(OpcStr, "(##$src2) = $src3")),
3283
let isExtended = 1, opExtendable = 0, mayStore = 1, isNVStore = 1,
3284
validSubTargets = HasV4SubT in
3285
def _abs_nv_V4 : NVInst_V4<(outs),
3286
(ins u0AlwaysExt:$src1, IntRegs:$src2),
3287
!strconcat(OpcStr, "(##$src1) = $src2.new"),
3291
let isExtended = 1, opExtendable = 1, mayStore = 1, isPredicated = 1,
3292
isNVStore = 1, validSubTargets = HasV4SubT in {
3293
def _abs_cPt_nv_V4 : NVInst_V4<(outs),
3294
(ins PredRegs:$src1, u0AlwaysExt:$src2, IntRegs:$src3),
3295
!strconcat("if ($src1)",
3296
!strconcat(OpcStr, "(##$src2) = $src3.new")),
3300
def _abs_cNotPt_nv_V4 : NVInst_V4<(outs),
3301
(ins PredRegs:$src1, u0AlwaysExt:$src2, IntRegs:$src3),
3302
!strconcat("if (!$src1)",
3303
!strconcat(OpcStr, "(##$src2) = $src3.new")),
3307
def _abs_cdnPt_nv_V4 : NVInst_V4<(outs),
3308
(ins PredRegs:$src1, u0AlwaysExt:$src2, IntRegs:$src3),
3309
!strconcat("if ($src1.new)",
3310
!strconcat(OpcStr, "(##$src2) = $src3.new")),
3314
def _abs_cdnNotPt_nv_V4 : NVInst_V4<(outs),
3315
(ins PredRegs:$src1, u0AlwaysExt:$src2, IntRegs:$src3),
3316
!strconcat("if (!$src1.new)",
3317
!strconcat(OpcStr, "(##$src2) = $src3.new")),
3323
defm STrib_imm : ST_absimm<"memb">;
3324
defm STrih_imm : ST_absimm<"memh">;
3325
defm STriw_imm : ST_absimm<"memw">;
3141
let AddedComplexity = 40 in
3142
def : Pat <(i32 (sextloadi8 (add IntRegs:$src1,
3143
(NumUsesBelowThresCONST32 tglobaladdr:$offset)))),
3144
(i32 (LDrib_ind_lo_V4 IntRegs:$src1, 0, tglobaladdr:$offset))>,
3147
let AddedComplexity = 40 in
3148
def : Pat <(i32 (zextloadi8 (add IntRegs:$src1,
3149
(NumUsesBelowThresCONST32 tglobaladdr:$offset)))),
3150
(i32 (LDriub_ind_lo_V4 IntRegs:$src1, 0, tglobaladdr:$offset))>,
3327
3153
let Predicates = [HasV4T], AddedComplexity = 30 in {
3328
3154
def : Pat<(truncstorei8 (i32 IntRegs:$src1), u0AlwaysExtPred:$src2),
3329
(STrib_imm_abs_V4 u0AlwaysExtPred:$src2, IntRegs: $src1)>;
3155
(STrib_abs_V4 u0AlwaysExtPred:$src2, IntRegs: $src1)>;
3331
3157
def : Pat<(truncstorei16 (i32 IntRegs:$src1), u0AlwaysExtPred:$src2),
3332
(STrih_imm_abs_V4 u0AlwaysExtPred:$src2, IntRegs: $src1)>;
3158
(STrih_abs_V4 u0AlwaysExtPred:$src2, IntRegs: $src1)>;
3334
3160
def : Pat<(store (i32 IntRegs:$src1), u0AlwaysExtPred:$src2),
3335
(STriw_imm_abs_V4 u0AlwaysExtPred:$src2, IntRegs: $src1)>;
3338
// Load - absolute addressing mode: These instruction take constant
3339
// value as the extended operand
3341
multiclass LD_absimm<string OpcStr> {
3342
let isExtended = 1, opExtendable = 1, isPredicable = 1,
3343
validSubTargets = HasV4SubT in
3344
def _abs_V4 : LDInst2<(outs IntRegs:$dst),
3345
(ins u0AlwaysExt:$src),
3346
!strconcat("$dst = ",
3347
!strconcat(OpcStr, "(##$src)")),
3351
let isExtended = 1, opExtendable = 2, isPredicated = 1,
3352
validSubTargets = HasV4SubT in {
3353
def _abs_cPt_V4 : LDInst2<(outs IntRegs:$dst),
3354
(ins PredRegs:$src1, u0AlwaysExt:$src2),
3355
!strconcat("if ($src1) $dst = ",
3356
!strconcat(OpcStr, "(##$src2)")),
3360
def _abs_cNotPt_V4 : LDInst2<(outs IntRegs:$dst),
3361
(ins PredRegs:$src1, u0AlwaysExt:$src2),
3362
!strconcat("if (!$src1) $dst = ",
3363
!strconcat(OpcStr, "(##$src2)")),
3367
def _abs_cdnPt_V4 : LDInst2<(outs IntRegs:$dst),
3368
(ins PredRegs:$src1, u0AlwaysExt:$src2),
3369
!strconcat("if ($src1.new) $dst = ",
3370
!strconcat(OpcStr, "(##$src2)")),
3374
def _abs_cdnNotPt_V4 : LDInst2<(outs IntRegs:$dst),
3375
(ins PredRegs:$src1, u0AlwaysExt:$src2),
3376
!strconcat("if (!$src1.new) $dst = ",
3377
!strconcat(OpcStr, "(##$src2)")),
3383
defm LDrib_imm : LD_absimm<"memb">;
3384
defm LDriub_imm : LD_absimm<"memub">;
3385
defm LDrih_imm : LD_absimm<"memh">;
3386
defm LDriuh_imm : LD_absimm<"memuh">;
3387
defm LDriw_imm : LD_absimm<"memw">;
3161
(STriw_abs_V4 u0AlwaysExtPred:$src2, IntRegs: $src1)>;
3389
3164
let Predicates = [HasV4T], AddedComplexity = 30 in {
3390
3165
def : Pat<(i32 (load u0AlwaysExtPred:$src)),
3391
(LDriw_imm_abs_V4 u0AlwaysExtPred:$src)>;
3166
(LDriw_abs_V4 u0AlwaysExtPred:$src)>;
3393
3168
def : Pat<(i32 (sextloadi8 u0AlwaysExtPred:$src)),
3394
(LDrib_imm_abs_V4 u0AlwaysExtPred:$src)>;
3169
(LDrib_abs_V4 u0AlwaysExtPred:$src)>;
3396
3171
def : Pat<(i32 (zextloadi8 u0AlwaysExtPred:$src)),
3397
(LDriub_imm_abs_V4 u0AlwaysExtPred:$src)>;
3172
(LDriub_abs_V4 u0AlwaysExtPred:$src)>;
3399
3174
def : Pat<(i32 (sextloadi16 u0AlwaysExtPred:$src)),
3400
(LDrih_imm_abs_V4 u0AlwaysExtPred:$src)>;
3175
(LDrih_abs_V4 u0AlwaysExtPred:$src)>;
3402
3177
def : Pat<(i32 (zextloadi16 u0AlwaysExtPred:$src)),
3403
(LDriuh_imm_abs_V4 u0AlwaysExtPred:$src)>;
3178
(LDriuh_abs_V4 u0AlwaysExtPred:$src)>;
3406
// Indexed store double word - global address.
3181
// Indexed store word - global address.
3407
3182
// memw(Rs+#u6:2)=#S8
3408
3183
let AddedComplexity = 10 in
3409
3184
def STriw_offset_ext_V4 : STInst<(outs),
3413
3188
(add IntRegs:$src1, u6_2ImmPred:$src2))]>,
3414
3189
Requires<[HasV4T]>;
3191
def : Pat<(i64 (ctlz (i64 DoubleRegs:$src1))),
3192
(i64 (COMBINE_Ir_V4 (i32 0), (i32 (CTLZ64_rr DoubleRegs:$src1))))>,
3195
def : Pat<(i64 (cttz (i64 DoubleRegs:$src1))),
3196
(i64 (COMBINE_Ir_V4 (i32 0), (i32 (CTTZ64_rr DoubleRegs:$src1))))>,
3201
// We need a complexity of 120 here to overide preceeding handling of
3203
let Predicates = [HasV4T], AddedComplexity = 120 in {
3204
def: Pat <(i64 (extloadi8 (NumUsesBelowThresCONST32 tglobaladdr:$addr))),
3205
(i64 (COMBINE_Ir_V4 0, (LDrib_abs_V4 tglobaladdr:$addr)))>;
3207
def: Pat <(i64 (zextloadi8 (NumUsesBelowThresCONST32 tglobaladdr:$addr))),
3208
(i64 (COMBINE_Ir_V4 0, (LDriub_abs_V4 tglobaladdr:$addr)))>;
3210
def: Pat <(i64 (sextloadi8 (NumUsesBelowThresCONST32 tglobaladdr:$addr))),
3211
(i64 (SXTW (LDrib_abs_V4 tglobaladdr:$addr)))>;
3213
def: Pat <(i64 (extloadi8 FoldGlobalAddr:$addr)),
3214
(i64 (COMBINE_Ir_V4 0, (LDrib_abs_V4 FoldGlobalAddr:$addr)))>;
3216
def: Pat <(i64 (zextloadi8 FoldGlobalAddr:$addr)),
3217
(i64 (COMBINE_Ir_V4 0, (LDriub_abs_V4 FoldGlobalAddr:$addr)))>;
3219
def: Pat <(i64 (sextloadi8 FoldGlobalAddr:$addr)),
3220
(i64 (SXTW (LDrib_abs_V4 FoldGlobalAddr:$addr)))>;
3223
// We need a complexity of 120 here to overide preceeding handling of
3225
let AddedComplexity = 120 in {
3226
def: Pat <(i64 (extloadi16 (NumUsesBelowThresCONST32 tglobaladdr:$addr))),
3227
(i64 (COMBINE_Ir_V4 0, (LDrih_abs_V4 tglobaladdr:$addr)))>,
3230
def: Pat <(i64 (zextloadi16 (NumUsesBelowThresCONST32 tglobaladdr:$addr))),
3231
(i64 (COMBINE_Ir_V4 0, (LDriuh_abs_V4 tglobaladdr:$addr)))>,
3234
def: Pat <(i64 (sextloadi16 (NumUsesBelowThresCONST32 tglobaladdr:$addr))),
3235
(i64 (SXTW (LDrih_abs_V4 tglobaladdr:$addr)))>,
3238
def: Pat <(i64 (extloadi16 FoldGlobalAddr:$addr)),
3239
(i64 (COMBINE_Ir_V4 0, (LDrih_abs_V4 FoldGlobalAddr:$addr)))>,
3242
def: Pat <(i64 (zextloadi16 FoldGlobalAddr:$addr)),
3243
(i64 (COMBINE_Ir_V4 0, (LDriuh_abs_V4 FoldGlobalAddr:$addr)))>,
3246
def: Pat <(i64 (sextloadi16 FoldGlobalAddr:$addr)),
3247
(i64 (SXTW (LDrih_abs_V4 FoldGlobalAddr:$addr)))>,
3251
// We need a complexity of 120 here to overide preceeding handling of
3253
let AddedComplexity = 120 in {
3254
def: Pat <(i64 (extloadi32 (NumUsesBelowThresCONST32 tglobaladdr:$addr))),
3255
(i64 (COMBINE_Ir_V4 0, (LDriw_abs_V4 tglobaladdr:$addr)))>,
3258
def: Pat <(i64 (zextloadi32 (NumUsesBelowThresCONST32 tglobaladdr:$addr))),
3259
(i64 (COMBINE_Ir_V4 0, (LDriw_abs_V4 tglobaladdr:$addr)))>,
3262
def: Pat <(i64 (sextloadi32 (NumUsesBelowThresCONST32 tglobaladdr:$addr))),
3263
(i64 (SXTW (LDriw_abs_V4 tglobaladdr:$addr)))>,
3266
def: Pat <(i64 (extloadi32 FoldGlobalAddr:$addr)),
3267
(i64 (COMBINE_Ir_V4 0, (LDriw_abs_V4 FoldGlobalAddr:$addr)))>,
3270
def: Pat <(i64 (zextloadi32 FoldGlobalAddr:$addr)),
3271
(i64 (COMBINE_Ir_V4 0, (LDriw_abs_V4 FoldGlobalAddr:$addr)))>,
3274
def: Pat <(i64 (sextloadi32 FoldGlobalAddr:$addr)),
3275
(i64 (SXTW (LDriw_abs_V4 FoldGlobalAddr:$addr)))>,
3417
3279
// Indexed store double word - global address.
3418
3280
// memw(Rs+#u6:2)=#S8