diff options
author | Joshua Cao <cao.joshua@yahoo.com> | 2023-04-08 17:31:43 -0700 |
---|---|---|
committer | Joshua Cao <cao.joshua@yahoo.com> | 2023-04-10 19:59:01 -0700 |
commit | 569f7e547d4124943a2aaa8da31bd82af0db37f2 (patch) | |
tree | 875046273df565bb380b8fbbaa2db37a2593e6c8 /llvm/lib/Analysis/ScalarEvolution.cpp | |
parent | 585742cbfccd734b19c75dff9709b20367506668 (diff) | |
download | llvm-569f7e547d4124943a2aaa8da31bd82af0db37f2.zip llvm-569f7e547d4124943a2aaa8da31bd82af0db37f2.tar.gz llvm-569f7e547d4124943a2aaa8da31bd82af0db37f2.tar.bz2 |
[SCEV][NFC] Convert check to assert getSmallConstantTripMultiple()
Diffstat (limited to 'llvm/lib/Analysis/ScalarEvolution.cpp')
-rw-r--r-- | llvm/lib/Analysis/ScalarEvolution.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/lib/Analysis/ScalarEvolution.cpp b/llvm/lib/Analysis/ScalarEvolution.cpp index 52bd161..ce77cce 100644 --- a/llvm/lib/Analysis/ScalarEvolution.cpp +++ b/llvm/lib/Analysis/ScalarEvolution.cpp @@ -8247,7 +8247,8 @@ unsigned ScalarEvolution::getSmallConstantTripMultiple(const Loop *L, // Guard against huge trip counts (this requires checking // for zero to handle the case where the trip count == -1 and the // addition wraps). - if (!Result || Result->getValue().getActiveBits() > 32 || + assert(Result && "SCEVConstant expected to have non-null ConstantInt"); + if (Result->getValue().getActiveBits() > 32 || Result->getValue().getActiveBits() == 0) return 1; |