Fix the ARM IIC_iCMPsi itinerary and add an important assert.
authorAndrew Trick <atrick@apple.com>
Tue, 4 Jan 2011 00:32:57 +0000 (00:32 +0000)
committerAndrew Trick <atrick@apple.com>
Tue, 4 Jan 2011 00:32:57 +0000 (00:32 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122794 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/ARM/ARMScheduleA9.td
lib/Target/ARM/ARMSubtarget.cpp

index eab6b98a846344ca2e70ae409a6055815c720c0b..a9632be61f2118e411134f8a2c37d2b59fed422d 100644 (file)
@@ -123,7 +123,8 @@ def CortexA9Itineraries : ProcessorItineraries<
   InstrItinData<IIC_iCMPr   , [InstrStage<1, [A9_Issue0, A9_Issue1], 0>,
                                InstrStage<1, [A9_ALU0, A9_ALU1]>],
                                [1, 1], [A9_LdBypass, A9_LdBypass]>,
-  InstrItinData<IIC_iCMPsi  , [InstrStage<2, [A9_ALU0, A9_ALU1]>],
+  InstrItinData<IIC_iCMPsi  , [InstrStage<1, [A9_Issue0, A9_Issue1], 0>,
+                               InstrStage<2, [A9_ALU0, A9_ALU1]>],
                                 [1, 1], [A9_LdBypass, NoBypass]>,
   InstrItinData<IIC_iCMPsr  , [InstrStage<1, [A9_Issue0, A9_Issue1], 0>,
                                InstrStage<3, [A9_ALU0, A9_ALU1]>],
index 6290e67675837f0be19bbd4091c7f1e6b272dde7..2b53cfd973462be2fadcf5169fa25f532b4e5357 100644 (file)
@@ -240,6 +240,7 @@ void ARMSubtarget::computeIssueWidth() {
     // clear the lowest bit
     allStage1Units ^= allStage1Units & ~(allStage1Units - 1);
   }
+  assert(InstrItins.IssueWidth <= 2 && "itinerary bug, too many stage 1 units");
 }
 
 bool ARMSubtarget::enablePostRAScheduler(