[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:27:08 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:
For those all the AAs here (in this file), it might not fail. There are generally three cases: 1) invalid IR position 2) filtered out AA (not in allow list) 3) function AA with `optnone`.
https://github.com/llvm/llvm-project/pull/114165
More information about the llvm-commits
mailing list