[llvm] [llvm][docs] Expand section on non-integral pointers (PR #73242)

Danila Malyutin via llvm-commits llvm-commits at lists.llvm.org
Thu Nov 23 09:34:08 PST 2023


https://github.com/danilaml updated https://github.com/llvm/llvm-project/pull/73242

>From 1ac0e4809970e5a53cb5bbf6084526f222af4b54 Mon Sep 17 00:00:00 2001
From: Danila Malyutin <dmalyutin at azul.com>
Date: Thu, 23 Nov 2023 17:37:05 +0400
Subject: [PATCH] [llvm][docs] Expand section on non-integral pointers

Specify their restrictions w.r.t. `align` attribute.
---
 llvm/docs/LangRef.rst | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/llvm/docs/LangRef.rst b/llvm/docs/LangRef.rst
index bc1eab1e0b7a07f..1958a3cb0d75ea6 100644
--- a/llvm/docs/LangRef.rst
+++ b/llvm/docs/LangRef.rst
@@ -634,6 +634,12 @@ implementation defined, the optimizer can't do the latter.  The former is
 challenging as many commonly expected properties, such as
 ``ptrtoint(v)-ptrtoint(v) == 0``, don't hold for non-integral types.
 
+Similar restrictions apply to intrinsics that might examine the pointer bits,
+such as :ref:`llvm.ptrmask<int_ptrmask>`. In particular, it's not
+correct to infer `align` attributes for such pointers based on examining their
+bits and frontends must ensure that all `align` attributes represent the
+conservative alignment valid for every possible representation of the pointer.
+
 .. _globalvars:
 
 Global Variables



More information about the llvm-commits mailing list