[llvm] [Support] Assert that DomTree nodes share parent (PR #101198)
Alexis Engelke via llvm-commits
llvm-commits at lists.llvm.org
Tue Jul 30 11:09:50 PDT 2024
================
@@ -526,6 +526,10 @@ bool llvm::isValidAssumeForContext(const Instruction *Inv,
return AllowEphemerals || !isEphemeralValueOf(Inv, CxtI);
}
+ // Inv and CxtI are in different functions.
+ if (Inv->getFunction() != CxtI->getFunction())
----------------
aengelke wrote:
The alignment-from-assumptions pass iterates over all users of alignment pointers of calls with an alignment assumption and calls `isValidAssumeForContext` with the the call instruction and the user of the ptr -- which can be a global, in which case users can be in different functions. (This actually happened. It reminds me that I should add a test case, because the tests didn't catch this -- only a stage2 LLVM compilation did. Will add a test case tomorrow.)
https://github.com/llvm/llvm-project/pull/101198
More information about the llvm-commits
mailing list