[llvm] [LangRef] Add immarg attributes to memcpy and memset isvolatile args (PR #210669)

Ömer Sinan Ağacan via llvm-commits llvm-commits at lists.llvm.org
Mon Jul 20 03:44:21 PDT 2026


https://github.com/osa1 updated https://github.com/llvm/llvm-project/pull/210669

>From 3d71d15aa74306392fd33bf5d1c277398737ef31 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C3=96mer=20Sinan=20A=C4=9Facan?= <omeragacan at gmail.com>
Date: Mon, 20 Jul 2026 10:22:46 +0100
Subject: [PATCH 1/2] [LangRef] Add `immarg` attributes to memcpy and memset
 isvolatile args

---
 llvm/docs/LangRef.md | 38 +++++++++++++++++++-------------------
 1 file changed, 19 insertions(+), 19 deletions(-)

diff --git a/llvm/docs/LangRef.md b/llvm/docs/LangRef.md
index 5275cf87d7cad..7cc6483c04c71 100644
--- a/llvm/docs/LangRef.md
+++ b/llvm/docs/LangRef.md
@@ -15992,9 +15992,9 @@ support all bit widths however.
 
 ```
 declare void @llvm.memcpy.p0.p0.i32(ptr <dest>, ptr <src>,
-                                    i32 <len>, i1 <isvolatile>)
+                                    i32 <len>, i1 immarg <isvolatile>)
 declare void @llvm.memcpy.p0.p0.i64(ptr <dest>, ptr <src>,
-                                    i64 <len>, i1 <isvolatile>)
+                                    i64 <len>, i1 immarg <isvolatile>)
 ```
 
 ##### Overview:
@@ -16016,7 +16016,7 @@ boolean indicating a volatile access.
 The {ref}`align <attr_align>` parameter attribute can be provided
 for the first and second arguments.
 
-If the `isvolatile` parameter is `true`, the `llvm.memcpy` call is
+If the immediate `isvolatile` parameter is `true`, the `llvm.memcpy` call is
 a {ref}`volatile operation <volatile>`. The detailed access behavior is not
 very cleanly specified and it is unwise to depend on it.
 
@@ -16046,9 +16046,9 @@ support all bit widths however.
 
 ```
 declare void @llvm.memcpy.inline.p0.p0.i32(ptr <dest>, ptr <src>,
-                                           i32 <len>, i1 <isvolatile>)
+                                           i32 <len>, i1 immarg <isvolatile>)
 declare void @llvm.memcpy.inline.p0.p0.i64(ptr <dest>, ptr <src>,
-                                           i64 <len>, i1 <isvolatile>)
+                                           i64 <len>, i1 immarg <isvolatile>)
 ```
 
 ##### Overview:
@@ -16071,8 +16071,8 @@ boolean indicating a volatile access.
 The {ref}`align <attr_align>` parameter attribute can be provided
 for the first and second arguments.
 
-If the `isvolatile` parameter is `true`, the `llvm.memcpy.inline` call is
-a {ref}`volatile operation <volatile>`. The detailed access behavior is not
+If the immediate `isvolatile` parameter is `true`, the `llvm.memcpy.inline` call
+is a {ref}`volatile operation <volatile>`. The detailed access behavior is not
 very cleanly specified and it is unwise to depend on it.
 
 ##### Semantics:
@@ -16098,9 +16098,9 @@ bit widths however.
 
 ```
 declare void @llvm.memmove.p0.p0.i32(ptr <dest>, ptr <src>,
-                                     i32 <len>, i1 <isvolatile>)
+                                     i32 <len>, i1 immarg <isvolatile>)
 declare void @llvm.memmove.p0.p0.i64(ptr <dest>, ptr <src>,
-                                     i64 <len>, i1 <isvolatile>)
+                                     i64 <len>, i1 immarg <isvolatile>)
 ```
 
 ##### Overview:
@@ -16118,7 +16118,7 @@ argument and the pointers can be in specified address spaces.
 
 The first argument is a pointer to the destination, the second is a
 pointer to the source. The third argument is an integer argument
-specifying the number of bytes to copy, and the fourth is a
+specifying the number of bytes to copy, and the fourth immediate argument is a
 boolean indicating a volatile access.
 
 The {ref}`align <attr_align>` parameter attribute can be provided
@@ -16154,9 +16154,9 @@ support all bit widths.
 
 ```
 declare void @llvm.memset.p0.i32(ptr <dest>, i8 <val>,
-                                 i32 <len>, i1 <isvolatile>)
+                                 i32 <len>, i1 immarg <isvolatile>)
 declare void @llvm.memset.p0.i64(ptr <dest>, i8 <val>,
-                                 i64 <len>, i1 <isvolatile>)
+                                 i64 <len>, i1 immarg <isvolatile>)
 ```
 
 ##### Overview:
@@ -16178,9 +16178,9 @@ is a boolean indicating a volatile access.
 The {ref}`align <attr_align>` parameter attribute can be provided
 for the first arguments.
 
-If the `isvolatile` parameter is `true`, the `llvm.memset` call is
-a {ref}`volatile operation <volatile>`. The detailed access behavior is not
-very cleanly specified and it is unwise to depend on it.
+If the immediate `isvolatile` parameter is `true`, the `llvm.memset` call is a
+{ref}`volatile operation <volatile>`. The detailed access behavior is not very
+cleanly specified and it is unwise to depend on it.
 
 ##### Semantics:
 
@@ -16207,9 +16207,9 @@ support all bit widths however.
 
 ```
 declare void @llvm.memset.inline.p0.i32(ptr <dest>, i8 <val>,
-                                        i32 <len>, i1 <isvolatile>)
+                                        i32 <len>, i1 immarg <isvolatile>)
 declare void @llvm.memset.inline.p0.i64(ptr <dest>, i8 <val>,
-                                        i64 <len>, i1 <isvolatile>)
+                                        i64 <len>, i1 immarg <isvolatile>)
 ```
 
 ##### Overview:
@@ -16231,8 +16231,8 @@ is a boolean indicating a volatile access.
 The {ref}`align <attr_align>` parameter attribute can be provided
 for the first argument.
 
-If the `isvolatile` parameter is `true`, the `llvm.memset.inline` call is
-a {ref}`volatile operation <volatile>`. The detailed access behavior is not
+If the immediate `isvolatile` parameter is `true`, the `llvm.memset.inline` call
+is a {ref}`volatile operation <volatile>`. The detailed access behavior is not
 very cleanly specified and it is unwise to depend on it.
 
 ##### Semantics:

>From b9e90c780f43c150189e5de81f855ca617df71ea Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C3=96mer=20Sinan=20A=C4=9Facan?= <omeragacan at gmail.com>
Date: Mon, 20 Jul 2026 11:44:08 +0100
Subject: [PATCH 2/2] Update

---
 llvm/docs/LangRef.md | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/llvm/docs/LangRef.md b/llvm/docs/LangRef.md
index 7cc6483c04c71..1f206de139319 100644
--- a/llvm/docs/LangRef.md
+++ b/llvm/docs/LangRef.md
@@ -16016,7 +16016,7 @@ boolean indicating a volatile access.
 The {ref}`align <attr_align>` parameter attribute can be provided
 for the first and second arguments.
 
-If the immediate `isvolatile` parameter is `true`, the `llvm.memcpy` call is
+If the `isvolatile` immediate parameter is `true`, the `llvm.memcpy` call is
 a {ref}`volatile operation <volatile>`. The detailed access behavior is not
 very cleanly specified and it is unwise to depend on it.
 
@@ -16071,7 +16071,7 @@ boolean indicating a volatile access.
 The {ref}`align <attr_align>` parameter attribute can be provided
 for the first and second arguments.
 
-If the immediate `isvolatile` parameter is `true`, the `llvm.memcpy.inline` call
+If the `isvolatile` immediate parameter is `true`, the `llvm.memcpy.inline` call
 is a {ref}`volatile operation <volatile>`. The detailed access behavior is not
 very cleanly specified and it is unwise to depend on it.
 
@@ -16124,7 +16124,7 @@ boolean indicating a volatile access.
 The {ref}`align <attr_align>` parameter attribute can be provided
 for the first and second arguments.
 
-If the `isvolatile` parameter is `true`, the `llvm.memmove` call
+If the `isvolatile` immediate parameter is `true`, the `llvm.memmove` call
 is a {ref}`volatile operation <volatile>`. The detailed access behavior is
 not very cleanly specified and it is unwise to depend on it.
 
@@ -16178,7 +16178,7 @@ is a boolean indicating a volatile access.
 The {ref}`align <attr_align>` parameter attribute can be provided
 for the first arguments.
 
-If the immediate `isvolatile` parameter is `true`, the `llvm.memset` call is a
+If the `isvolatile` immediate parameter is `true`, the `llvm.memset` call is a
 {ref}`volatile operation <volatile>`. The detailed access behavior is not very
 cleanly specified and it is unwise to depend on it.
 
@@ -16231,9 +16231,9 @@ is a boolean indicating a volatile access.
 The {ref}`align <attr_align>` parameter attribute can be provided
 for the first argument.
 
-If the immediate `isvolatile` parameter is `true`, the `llvm.memset.inline` call
-is a {ref}`volatile operation <volatile>`. The detailed access behavior is not
-very cleanly specified and it is unwise to depend on it.
+If the `isvolatile` immediate parameter is `true`, the `llvm.memset.inline`
+call is a {ref}`volatile operation <volatile>`. The detailed access behavior is
+not very cleanly specified and it is unwise to depend on it.
 
 ##### Semantics:
 



More information about the llvm-commits mailing list