[llvm] [Inliner] Fix bugs for partial inlining with vector (PR #101481)
David Li via llvm-commits
llvm-commits at lists.llvm.org
Fri Aug 16 10:17:48 PDT 2024
================
@@ -1308,8 +1308,8 @@ bool PartialInlinerImpl::tryPartialInline(FunctionCloner &Cloner) {
InstructionCost SizeCost = std::get<0>(OutliningCosts);
InstructionCost NonWeightedRcost = std::get<1>(OutliningCosts);
- assert(SizeCost.isValid() && NonWeightedRcost.isValid() &&
- "Expected valid costs");
+ if (!SizeCost.isValid() || !NonWeightedRcost.isValid())
----------------
david-xl wrote:
In what cases are the cost invalid? A test to illustrate would be good.
https://github.com/llvm/llvm-project/pull/101481
More information about the llvm-commits
mailing list