From ed46a5f15d6d8f8e22050d476a682ed7253c2821 Mon Sep 17 00:00:00 2001 From: Chen Zheng Date: Tue, 9 Apr 2019 01:25:25 +0000 Subject: [PATCH] [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 --- lib/Target/PowerPC/PPCCTRLoops.cpp | 1 + test/CodeGen/PowerPC/ctrloop-shortLoops.ll | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) 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: -- 2.50.1