1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-21 03:53:04 +02:00

Revert r254279 "[X86] Use ArrayRef. NFC". It seems to have upset an MSVC build bot.

llvm-svn: 254280
This commit is contained in:
Craig Topper 2015-11-30 02:28:19 +00:00
parent c6a64c52f0
commit c1aa433aed

View File

@ -3517,11 +3517,14 @@ unsigned X86InstrInfo::getFMA3OpcodeToCommuteOperands(MachineInstr *MI,
bool IsIntrinOpcode;
isFMA3(Opc, &IsIntrinOpcode);
ArrayRef<unsigned[3]> OpcodeGroups;
unsigned GroupsNum;
const unsigned (*OpcodeGroups)[3];
if (IsIntrinOpcode) {
OpcodeGroups = makeArrayRef(IntrinOpcodeGroups);
GroupsNum = sizeof(IntrinOpcodeGroups) / sizeof(IntrinOpcodeGroups[0]);
OpcodeGroups = IntrinOpcodeGroups;
} else {
OpcodeGroups = makeArrayRef(RegularOpcodeGroups);
GroupsNum = sizeof(RegularOpcodeGroups) / sizeof(RegularOpcodeGroups[0]);
OpcodeGroups = RegularOpcodeGroups;
}
const unsigned *FoundOpcodesGroup = nullptr;
@ -3529,7 +3532,7 @@ unsigned X86InstrInfo::getFMA3OpcodeToCommuteOperands(MachineInstr *MI,
// Look for the input opcode in the corresponding opcodes table.
unsigned GroupIndex = 0;
for (; GroupIndex < OpcodeGroups.size() && !FoundOpcodesGroup; GroupIndex++) {
for (; GroupIndex < GroupsNum && !FoundOpcodesGroup; GroupIndex++) {
for (FormIndex = 0; FormIndex < FormsNum; FormIndex++) {
if (OpcodeGroups[GroupIndex][FormIndex] == Opc) {
FoundOpcodesGroup = OpcodeGroups[GroupIndex];