[llvm] d58514d - [LSR][NFC] Make sure that after the canonicalization the formula is canonical
Max Kazantsev via llvm-commits
llvm-commits at lists.llvm.org
Sun Jun 27 22:54:33 PDT 2021
Author: Max Kazantsev
Date: 2021-06-28T12:50:04+07:00
New Revision: d58514d41c3dedc67b9f043d61f160810a64b208
URL: https://github.com/llvm/llvm-project/commit/d58514d41c3dedc67b9f043d61f160810a64b208
DIFF: https://github.com/llvm/llvm-project/commit/d58514d41c3dedc67b9f043d61f160810a64b208.diff
LOG: [LSR][NFC] Make sure that after the canonicalization the formula is canonical
Added:
Modified:
llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp b/llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp
index 5d2d9678ce35..c573b1a3a770 100644
--- a/llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp
+++ b/llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp
@@ -533,6 +533,7 @@ void Formula::canonicalize(const Loop &L) {
if (I != BaseRegs.end())
std::swap(ScaledReg, *I);
}
+ assert(isCanonical(L) && "Failed to canonicalize?");
}
/// Get rid of the scale in the formula.
More information about the llvm-commits
mailing list