[llvm] [IR] Add initial support for the byte type (PR #178666)
Antonio Frighetto via llvm-commits
llvm-commits at lists.llvm.org
Mon Feb 2 06:55:27 PST 2026
================
@@ -4432,6 +4432,42 @@ Examples:
| ``i1942652`` | a really big integer of over 1 million bits. |
+----------------+------------------------------------------------+
+.. _t_byte:
+
+Byte Type
+""""""""""""
+
+:Overview:
+
+The byte type represents raw memory data in SSA registers. It should be used
+when it cannot be determined whether a value holds a pointer or another type at
+run time. Otherwise, the specific type should be used. Each bit can be:
+
+* An integer bit (0 or 1)
+* Part of a pointer value
+* ``poison``
+
+Any bit width from 1 bit to 2\ :sup:`23`\ (about 8 million) can be specified.
+
+:Syntax:
+
+::
+
+ bN
+
+The number of bits the byte occupies is specified by the ``N`` value.
+
+Examples:
+*********
+
++----------------+------------------------------------------------+
+| ``b1`` | a single-bit byte value. |
++----------------+------------------------------------------------+
+| ``b32`` | a 32-bit byte value. |
++----------------+------------------------------------------------+
+| ``b128`` | a 128-bit byte value. |
++----------------+------------------------------------------------+
+
----------------
antoniofrighetto wrote:
Should we mention somewhere we expect the bitwidth to be only multiple of 8?
https://github.com/llvm/llvm-project/pull/178666
More information about the llvm-commits
mailing list