[llvm] [DataLayout] Remove i1 alignment entry (PR #156657)

Sergei Barannikov via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 3 09:04:09 PDT 2025


s-barannikov wrote:

> The goal is to reduce the scan for finding the integer alignment by one.

The search is log2(N) so the reduction is < 0.35 in the common case of N >= 5.

> So if for example using i4:16:16 or i8:16:16 in the datalayout without specifying anything for i1 this isn't really NFC as one would inherit the larger types alignment. But that indeed looks like a strange use case.

i8 can't have an alignment other than 8, see 4dbf3f2e8e72472161223d084c5646b76cc41d63. Maybe we should check that types smaller than a byte also have byte alignment for the same reason?


https://github.com/llvm/llvm-project/pull/156657


More information about the llvm-commits mailing list