[llvm] [AMDGPU][Attributor] Check the validity of a dependent AA before using its value (PR #114165)
Shilei Tian via llvm-commits
llvm-commits at lists.llvm.org
Tue Oct 29 19:20:44 PDT 2024
================
@@ -449,7 +449,8 @@ struct AAAMDAttributesFunction : public AAAMDAttributes {
// Check for Intrinsics and propagate attributes.
const AACallEdges *AAEdges = A.getAAFor<AACallEdges>(
*this, this->getIRPosition(), DepClassTy::REQUIRED);
- if (!AAEdges || AAEdges->hasNonAsmUnknownCallee())
+ if (!AAEdges || !AAEdges->isValidState() ||
----------------
shiltian wrote:
If the IR position is not valid for the queried AA, it can fail.
https://github.com/llvm/llvm-project/pull/114165
More information about the llvm-commits
mailing list