[llvm] [DataLayout] Remove i1 alignment entry (PR #156657)
Björn Pettersson via llvm-commits
llvm-commits at lists.llvm.org
Wed Sep 3 06:49:30 PDT 2025
bjope wrote:
Right. As you say, this only remove the default for i1 types. `getIntegerAlignment` is returning alignment of next larger integer (in case there is no exact match). 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.
Not sure what the goal is here. It will reduce size of `DefaultIntSpecs `tables. But for targets that setup i1 alignment in the datalayout (not sure how common that is but afaict there are lots of test cases doing it), we would end up inserting elements at the beginning of the vector when parsing the datalayout (in `setPrimitiveSpec`). So we win some lose some.
Should we follow up and remove irrelevant entries for i1 in datalayouts (or maybe even clean that up as a first step)?
https://github.com/llvm/llvm-project/pull/156657
More information about the llvm-commits
mailing list