From cfca06d7963fa0909f90483b42a6d7d194d01e08 Mon Sep 17 00:00:00 2001 From: Dimitry Andric Date: Sun, 26 Jul 2020 19:36:28 +0000 Subject: Vendor import of llvm-project master 2e10b7a39b9, the last commit before the llvmorg-12-init tag, from which release/11.x was branched. --- llvm/lib/CodeGen/MachineCombiner.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'llvm/lib/CodeGen/MachineCombiner.cpp') diff --git a/llvm/lib/CodeGen/MachineCombiner.cpp b/llvm/lib/CodeGen/MachineCombiner.cpp index 73895bdf834f5..f241435a04823 100644 --- a/llvm/lib/CodeGen/MachineCombiner.cpp +++ b/llvm/lib/CodeGen/MachineCombiner.cpp @@ -269,6 +269,8 @@ static CombinerObjective getCombinerObjective(MachineCombinerPattern P) { case MachineCombinerPattern::REASSOC_AX_YB: case MachineCombinerPattern::REASSOC_XA_BY: case MachineCombinerPattern::REASSOC_XA_YB: + case MachineCombinerPattern::REASSOC_XY_AMM_BMM: + case MachineCombinerPattern::REASSOC_XMM_AMM_BMM: return CombinerObjective::MustReduceDepth; default: return CombinerObjective::Default; @@ -406,12 +408,14 @@ bool MachineCombiner::preservesResourceLen( << ResLenBeforeCombine << " and after: " << ResLenAfterCombine << "\n";); LLVM_DEBUG( - ResLenAfterCombine <= ResLenBeforeCombine + ResLenAfterCombine <= + ResLenBeforeCombine + TII->getExtendResourceLenLimit() ? dbgs() << "\t\t As result it IMPROVES/PRESERVES Resource Length\n" : dbgs() << "\t\t As result it DOES NOT improve/preserve Resource " "Length\n"); - return ResLenAfterCombine <= ResLenBeforeCombine; + return ResLenAfterCombine <= + ResLenBeforeCombine + TII->getExtendResourceLenLimit(); } /// \returns true when new instruction sequence should be generated -- cgit v1.2.3