[PATCH] D139528: [AsmParser] Check that addrspace fits within 24 bits

Alexander Richardson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Dec 7 06:58:32 PST 2022


arichardson added a comment.

Minor suggestions inline. Would you mind rebasing this on https://reviews.llvm.org/D138789 (which I will commit once approved). Should make the diff slightly smaller.



================
Comment at: llvm/lib/AsmParser/LLParser.cpp:1795-1796
+    return true;
+  if (AddrSpace >= (1 << 24))
+    return error(loc, "address space too large to fit in 24 bits");
+  return false;
----------------
To match the logic in DataLayout.cpp. However, ideally we should have a shared constant somewhere instead of duplicating this knowledge.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D139528/new/

https://reviews.llvm.org/D139528



More information about the llvm-commits mailing list