]> granicus.if.org Git - llvm/commitdiff
[PowerPC] initialize SchedModel according to platform.
authorChen Zheng <czhengsz@cn.ibm.com>
Tue, 9 Apr 2019 01:25:25 +0000 (01:25 +0000)
committerChen Zheng <czhengsz@cn.ibm.com>
Tue, 9 Apr 2019 01:25:25 +0000 (01:25 +0000)
Differential Revision: https://reviews.llvm.org/D60177

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@357962 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/PowerPC/PPCCTRLoops.cpp
test/CodeGen/PowerPC/ctrloop-shortLoops.ll

index c52d7d83dfc5a653f62fdc9dc0b19bede33fe68c..526e06aeb2a5e4c8feb04d0a1542620ad5217d2d 100644 (file)
@@ -202,6 +202,7 @@ bool PPCCTRLoops::runOnFunction(Function &F) {
   auto *TLIP = getAnalysisIfAvailable<TargetLibraryInfoWrapperPass>();
   LibInfo = TLIP ? &TLIP->getTLI() : nullptr;
   PreserveLCSSA = mustPreserveAnalysisID(LCSSAID);
+  SchedModel.init(STI);
 
   bool MadeChange = false;
 
index ed9ec4300de9ca86d9127ef67f787dbdf8f40bc3..1f5edfa33e159fc039c3e29e54e8ee90d56c542f 100644 (file)
@@ -122,7 +122,7 @@ for.end:                                          ; preds = %if.end
 ; a2q should use mtctr, but pwr8 should not use mtctr.
 define signext i32 @testTripCount5() {
 ; CHECK-LABEL: testTripCount5:
-; CHECK-PWR8: mtctr
+; CHECK-PWR8-NOT: mtctr
 ; CHECK-A2Q: mtctr
  
 entry: