aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFlorian Hahn <flo@fhahn.com>2024-05-22 15:30:38 +0100
committerFlorian Hahn <flo@fhahn.com>2024-08-01 20:47:30 +0100
commit352daca41eb2611871ad9366b7676662d85f41d8 (patch)
tree700640e9a5eafe181e994cbd9a1de78f788529c9
parent2fbeb5fa9fa2504152da5003923ce1bd075be0a8 (diff)
downloadllvm-users/fhahn/scevuse.zip
llvm-users/fhahn/scevuse.tar.gz
llvm-users/fhahn/scevuse.tar.bz2
!fix formattingusers/fhahn/scevuse
-rw-r--r--llvm/lib/Analysis/ScalarEvolution.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/llvm/lib/Analysis/ScalarEvolution.cpp b/llvm/lib/Analysis/ScalarEvolution.cpp
index 15e7e65..765c09b 100644
--- a/llvm/lib/Analysis/ScalarEvolution.cpp
+++ b/llvm/lib/Analysis/ScalarEvolution.cpp
@@ -10603,8 +10603,9 @@ ScalarEvolution::getPredecessorWithUniqueSuccessorForBB(const BasicBlock *BB)
/// guarding a loop, it can be useful to be a little more general, since a
/// front-end may have replicated the controlling expression.
static bool HasSameValue(SCEVUse A, SCEVUse B) {
- // Quick check to see if they are the same SCEV.
- if (A == B) return true;
+ // Quick check to see if they are the same SCEV, ignoring use-specific flags.
+ if (A.getPointer() == B.getPointer())
+ return true;
auto ComputesEqualValues = [](const Instruction *A, const Instruction *B) {
// Not all instructions that are "identical" compute the same value. For