[llvm] [BasicAA][TLI] Local-linkage or non-thread-local globals may not alias errno (PR #170290)
Yingwei Zheng via llvm-commits
llvm-commits at lists.llvm.org
Sat Dec 6 07:46:04 PST 2025
================
@@ -1870,8 +1870,21 @@ AliasResult BasicAAResult::aliasErrno(const MemoryLocation &Loc,
Loc.Size.getValue().getKnownMinValue() * 8 > TLI.getIntSize())
return AliasResult::NoAlias;
- if (isIdentifiedFunctionLocal(getUnderlyingObject(Loc.Ptr)))
+ const Value *Object = getUnderlyingObject(Loc.Ptr);
+ if (isIdentifiedFunctionLocal(Object))
return AliasResult::NoAlias;
+
+ if (auto *GV = dyn_cast<GlobalVariable>(Object)) {
----------------
dtcxzyw wrote:
Do we need additional logic for GlobalAlias? Or has it been handled by other places?
https://github.com/llvm/llvm-project/pull/170290
More information about the llvm-commits
mailing list