[llvm] 5a68e57 - [ConstraintElim] Add debug message when decomposition fails.
Florian Hahn via llvm-commits
llvm-commits at lists.llvm.org
Fri Oct 14 03:02:28 PDT 2022
Author: Florian Hahn
Date: 2022-10-14T11:02:05+01:00
New Revision: 5a68e578cafe5b0bc7c00772185ccbf3cdcc795a
URL: https://github.com/llvm/llvm-project/commit/5a68e578cafe5b0bc7c00772185ccbf3cdcc795a
DIFF: https://github.com/llvm/llvm-project/commit/5a68e578cafe5b0bc7c00772185ccbf3cdcc795a.diff
LOG: [ConstraintElim] Add debug message when decomposition fails.
Added:
Modified:
llvm/lib/Transforms/Scalar/ConstraintElimination.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Transforms/Scalar/ConstraintElimination.cpp b/llvm/lib/Transforms/Scalar/ConstraintElimination.cpp
index 89d22a403a208..261548af81069 100644
--- a/llvm/lib/Transforms/Scalar/ConstraintElimination.cpp
+++ b/llvm/lib/Transforms/Scalar/ConstraintElimination.cpp
@@ -748,8 +748,10 @@ static bool checkAndReplaceCondition(CmpInst *Cmp, ConstraintInfo &Info) {
Value *B = Cmp->getOperand(1);
auto R = Info.getConstraintForSolving(Pred, A, B);
- if (R.empty() || !R.isValid(Info))
+ if (R.empty() || !R.isValid(Info)){
+ LLVM_DEBUG(dbgs() << " failed to decompose condition\n");
return false;
+ }
auto &CSToUse = Info.getCS(R.IsSigned);
More information about the llvm-commits
mailing list