From: Chen Zheng Date: Tue, 9 Apr 2019 01:25:25 +0000 (+0000) Subject: [PowerPC] initialize SchedModel according to platform. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=ed46a5f15d6d8f8e22050d476a682ed7253c2821;p=llvm [PowerPC] initialize SchedModel according to platform. Differential Revision: https://reviews.llvm.org/D60177 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@357962 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Target/PowerPC/PPCCTRLoops.cpp b/lib/Target/PowerPC/PPCCTRLoops.cpp index c52d7d83dfc..526e06aeb2a 100644 --- a/lib/Target/PowerPC/PPCCTRLoops.cpp +++ b/lib/Target/PowerPC/PPCCTRLoops.cpp @@ -202,6 +202,7 @@ bool PPCCTRLoops::runOnFunction(Function &F) { auto *TLIP = getAnalysisIfAvailable(); LibInfo = TLIP ? &TLIP->getTLI() : nullptr; PreserveLCSSA = mustPreserveAnalysisID(LCSSAID); + SchedModel.init(STI); bool MadeChange = false; diff --git a/test/CodeGen/PowerPC/ctrloop-shortLoops.ll b/test/CodeGen/PowerPC/ctrloop-shortLoops.ll index ed9ec4300de..1f5edfa33e1 100644 --- a/test/CodeGen/PowerPC/ctrloop-shortLoops.ll +++ b/test/CodeGen/PowerPC/ctrloop-shortLoops.ll @@ -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: