Skip to content

Commit ed46a5f

Browse files
author
Chen Zheng
committed
[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
1 parent 2accefa commit ed46a5f

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

lib/Target/PowerPC/PPCCTRLoops.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -202,6 +202,7 @@ bool PPCCTRLoops::runOnFunction(Function &F) {
202202
auto *TLIP = getAnalysisIfAvailable<TargetLibraryInfoWrapperPass>();
203203
LibInfo = TLIP ? &TLIP->getTLI() : nullptr;
204204
PreserveLCSSA = mustPreserveAnalysisID(LCSSAID);
205+
SchedModel.init(STI);
205206

206207
bool MadeChange = false;
207208

test/CodeGen/PowerPC/ctrloop-shortLoops.ll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ for.end: ; preds = %if.end
122122
; a2q should use mtctr, but pwr8 should not use mtctr.
123123
define signext i32 @testTripCount5() {
124124
; CHECK-LABEL: testTripCount5:
125-
; CHECK-PWR8: mtctr
125+
; CHECK-PWR8-NOT: mtctr
126126
; CHECK-A2Q: mtctr
127127

128128
entry:

0 commit comments

Comments
 (0)