[llvm] [Verifier] Make verifier fail when global variable size exceeds address space size (PR #179625)
Nikita Popov via llvm-commits
llvm-commits at lists.llvm.org
Wed Feb 4 01:06:33 PST 2026
================
@@ -955,6 +955,16 @@ void Verifier::visitGlobalVariable(const GlobalVariable &GV) {
"Global @" + GV.getName() + " has illegal target extension type",
GVType);
+ // Check that the the address space can hold all bits of the type, recognized
+ // by an access in the address space being able to reach all bytes of the
+ // type.
+ Check(GVType->isScalableTy() || !GVType->isSized() ||
----------------
nikic wrote:
Globals can't be scalable (checked a few lines above).
https://github.com/llvm/llvm-project/pull/179625
More information about the llvm-commits
mailing list