[llvm] [LangRef] Document the difference between `<abi>` and `<pref>` (PR #147929)

Nikita Popov via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 10 08:11:09 PDT 2025


================
@@ -3240,12 +3240,15 @@ as follows:
     as :ref:`Non-Integral Pointer Type <nointptrtype>` s.  The ``0``
     address space cannot be specified as non-integral.
 
+``<abi>`` provides a minimum allowed alignment for a type, and
----------------
nikic wrote:

"minimum allowed alignment" isn't really accurate in that you *can* use lower alignments, they'll just be considered unaligned.

The ABI alignment is used in various places:

 * The default alignment for loads and stores when no explicit alignment is given in textual IR.
 * The alignment used to compute struct layout.
 * The alignment used to compute allocation sizes and thus getelementptr offsets.
 * The alignment below which accesses are considered underaligned.
 * ...

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


More information about the llvm-commits mailing list