[PATCH] D142211: [LangRef] Require i8s to be naturally aligned

Jannik Silvanus via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jan 23 00:34:37 PST 2023


jsilvanus added a comment.

Thanks for the review, I've updated the patch accordingly.



================
Comment at: llvm/lib/IR/DataLayout.cpp:409
         return reportError("Invalid ABI alignment, must be a power of 2");
+      if (Size == 8 && ABIAlign != 1)
+        return reportError(
----------------
nikic wrote:
> I'd suggest adding an `AlignType == INTEGER_ALIGN &&` here. Probably doesn't matter in practice, but that limits it more explicitly to `i8`.
Thanks for the suggestion, I added the restriction. 
I've seen some recent discussions about `fp8` types, so it may not be that irrelevant after all.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D142211



More information about the llvm-commits mailing list