File tree Expand file tree Collapse file tree 2 files changed +17
-0
lines changed Expand file tree Collapse file tree 2 files changed +17
-0
lines changed Original file line number Diff line number Diff line change @@ -1182,17 +1182,29 @@ namespace X86II {
1182
1182
}
1183
1183
}
1184
1184
1185
+ // / \returns true if the register is a XMM.
1185
1186
inline bool isXMMReg (unsigned RegNo) {
1187
+ assert (X86::XMM15 - X86::XMM0 == 15 &&
1188
+ " XMM0-15 registers are not continuous" );
1189
+ assert (X86::XMM31 - X86::XMM16 == 15 &&
1190
+ " XMM16-31 registers are not continuous" );
1186
1191
return (RegNo >= X86::XMM0 && RegNo <= X86::XMM15) ||
1187
1192
(RegNo >= X86::XMM16 && RegNo <= X86::XMM31);
1188
1193
}
1189
1194
1195
+ // / \returns true if the register is a YMM.
1190
1196
inline bool isYMMReg (unsigned RegNo) {
1197
+ assert (X86::YMM15 - X86::YMM0 == 15 &&
1198
+ " YMM0-15 registers are not continuous" );
1199
+ assert (X86::YMM31 - X86::YMM16 == 15 &&
1200
+ " YMM16-31 registers are not continuous" );
1191
1201
return (RegNo >= X86::YMM0 && RegNo <= X86::YMM15) ||
1192
1202
(RegNo >= X86::YMM16 && RegNo <= X86::YMM31);
1193
1203
}
1194
1204
1205
+ // / \returns true if the register is a ZMM.
1195
1206
inline bool isZMMReg (unsigned RegNo) {
1207
+ assert (X86::ZMM31 - X86::ZMM0 == 31 && " ZMM registers are not continuous" );
1196
1208
return RegNo >= X86::ZMM0 && RegNo <= X86::ZMM31;
1197
1209
}
1198
1210
Original file line number Diff line number Diff line change @@ -631,6 +631,11 @@ unsigned X86RegisterInfo::getNumSupportedRegs(const MachineFunction &MF) const {
631
631
//
632
632
// and try to return the minimum number of registers supported by the target.
633
633
634
+ assert ((X86::R15WH + 1 == X86 ::YMM0) && (X86::YMM15 + 1 == X86::K0) &&
635
+ (X86::K6_K7 + 1 == X86::TMMCFG) &&
636
+ (X86::TMM7 + 1 == X86::NUM_TARGET_REGS) &&
637
+ " Register number may be incorrect" );
638
+
634
639
bool HasAVX = ST.hasAVX ();
635
640
bool HasAVX512 = ST.hasAVX512 ();
636
641
bool HasAMX = ST.hasAMXTILE ();
You can’t perform that action at this time.
0 commit comments