Index: llvm/trunk/lib/Target/PowerPC/PPCCTRLoops.cpp =================================================================== --- llvm/trunk/lib/Target/PowerPC/PPCCTRLoops.cpp +++ llvm/trunk/lib/Target/PowerPC/PPCCTRLoops.cpp @@ -202,6 +202,7 @@ auto *TLIP = getAnalysisIfAvailable(); LibInfo = TLIP ? &TLIP->getTLI() : nullptr; PreserveLCSSA = mustPreserveAnalysisID(LCSSAID); + SchedModel.init(STI); bool MadeChange = false; Index: llvm/trunk/test/CodeGen/PowerPC/ctrloop-shortLoops.ll =================================================================== --- llvm/trunk/test/CodeGen/PowerPC/ctrloop-shortLoops.ll +++ llvm/trunk/test/CodeGen/PowerPC/ctrloop-shortLoops.ll @@ -122,7 +122,7 @@ ; 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: