[llvm] [LangRef/DataLayout] Spell out requirements for alignment values (PR #104705)

Sergei Barannikov via llvm-commits llvm-commits at lists.llvm.org
Sun Aug 18 06:32:13 PDT 2024


================
@@ -3030,8 +3030,10 @@ as follows:
 ``S<size>``
     Specifies the natural alignment of the stack in bits. Alignment
     promotion of stack variables is limited to the natural stack
-    alignment to avoid dynamic stack realignment. The stack alignment
-    must be a multiple of 8-bits. If omitted, the natural stack
+    alignment to avoid dynamic stack realignment.
+    The stack alignment must be must be in the range [1,2^16)
+    and must be a power of two times the byte width.
----------------
s-barannikov wrote:

I'm not very happy with this wording.
What I'm trying to say is that the value must be `ByteWidth * 2^N` ,without assuming that ByteWidth == 8.


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


More information about the llvm-commits mailing list