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

Craig Topper via llvm-commits llvm-commits at lists.llvm.org
Sun Nov 29 18:28:20 PST 2015


Author: ctopper
Date: Sun Nov 29 20:28:19 2015
New Revision: 254280

URL: http://llvm.org/viewvc/llvm-project?rev=254280&view=rev
Log:
Revert r254279 "[X86] Use ArrayRef. NFC". It seems to have upset an MSVC build bot.

Modified:
    llvm/trunk/lib/Target/X86/X86InstrInfo.cpp

Modified: llvm/trunk/lib/Target/X86/X86InstrInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86InstrInfo.cpp?rev=254280&r1=254279&r2=254280&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/X86InstrInfo.cpp (original)
+++ llvm/trunk/lib/Target/X86/X86InstrInfo.cpp Sun Nov 29 20:28:19 2015
@@ -3517,11 +3517,14 @@ unsigned X86InstrInfo::getFMA3OpcodeToCo
   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::getFMA3OpcodeToCo
 
   // 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];




More information about the llvm-commits mailing list