[PATCH] D110751: [DomTree] Assert that blocks in queries aren't from another function
Arthur Eubanks via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Oct 1 15:45:53 PDT 2021
aeubanks added a comment.
nice find, looks like `Addr` might be a global with type `i8*`, might need a similar fix to the unswitch one like
--- a/llvm/lib/Transforms/Scalar/LICM.cpp
+++ b/llvm/lib/Transforms/Scalar/LICM.cpp
@@ -1068,6 +1068,8 @@ static bool isLoadInvariantInLoop(LoadInst *LI, DominatorTree *DT,
return false;
Addr = BC->getOperand(0);
}
+ if (isa<Constant>(Addr))
+ return false;
unsigned UsesVisited = 0;
// Traverse all uses of the load operand value, to see if invariant.start is
I managed to repro the stage2 failure and this fix does fix the crash, just need to come up with a reduced test case
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D110751/new/
https://reviews.llvm.org/D110751
More information about the llvm-commits
mailing list