<feed xmlns='http://www.w3.org/2005/Atom'>
<title>llvm-project.git/clang/test/CodeGenCXX/ext-int.cpp, branch main</title>
<subtitle>Unnamed repository; edit this file 'description' to name the repository.
</subtitle>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/'/>
<entry>
<title>[Clang] Allow vector and matrix type attributes for sub-byte _BitInt (#140253)</title>
<updated>2025-05-20T13:06:36+00:00</updated>
<author>
<name>Dmitry Sidorov</name>
<email>dmitry.sidorov@intel.com</email>
</author>
<published>2025-05-20T13:06:36+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=d56d537f9b003869e9376fd9e15bff99423ca4af'/>
<id>d56d537f9b003869e9376fd9e15bff99423ca4af</id>
<content type='text'>
It is useful for several cases, particularly for 4-bit integers.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
It is useful for several cases, particularly for 4-bit integers.</pre>
</div>
</content>
</entry>
<entry>
<title>[clang] Reject `_Complex _BitInt` (#119402)</title>
<updated>2024-12-12T11:19:48+00:00</updated>
<author>
<name>Mariya Podchishchaeva</name>
<email>mariya.podchishchaeva@intel.com</email>
</author>
<published>2024-12-12T11:19:48+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=1d65c35ce16f1bc340649ac8319b34c833e23a1f'/>
<id>1d65c35ce16f1bc340649ac8319b34c833e23a1f</id>
<content type='text'>
The C standard doesn't require support for these types and Codegen for
these types is incorrect ATM.
See https://github.com/llvm/llvm-project/issues/119352</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The C standard doesn't require support for these types and Codegen for
these types is incorrect ATM.
See https://github.com/llvm/llvm-project/issues/119352</pre>
</div>
</content>
</entry>
<entry>
<title>[LLVM][IR] Use splat syntax when printing Constant[Data]Vector. (#112548)</title>
<updated>2024-11-06T11:53:33+00:00</updated>
<author>
<name>Paul Walker</name>
<email>paul.walker@arm.com</email>
</author>
<published>2024-11-06T11:53:33+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=38fffa630ee80163dc65e759392ad29798905679'/>
<id>38fffa630ee80163dc65e759392ad29798905679</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>[clang] Fix crash related to _BitInt constant split (#112218)</title>
<updated>2024-10-15T07:44:20+00:00</updated>
<author>
<name>Mariya Podchishchaeva</name>
<email>mariya.podchishchaeva@intel.com</email>
</author>
<published>2024-10-15T07:44:20+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=b528b131b615fef06f26b07ec178e230280ef71d'/>
<id>b528b131b615fef06f26b07ec178e230280ef71d</id>
<content type='text'>
9ad72df55cb74b29193270c28f6974d2af8e0b71 added split of _BitInt
constants when required. Before folding back, check that the constant
exists.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
9ad72df55cb74b29193270c28f6974d2af8e0b71 added split of _BitInt
constants when required. Before folding back, check that the constant
exists.</pre>
</div>
</content>
</entry>
<entry>
<title>[IRBuilder] Generate nuw GEPs for struct member accesses (#99538)</title>
<updated>2024-08-09T12:25:04+00:00</updated>
<author>
<name>Hari Limaye</name>
<email>hari.limaye@arm.com</email>
</author>
<published>2024-08-09T12:25:04+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=94473f4db6a6f5f12d7c4081455b5b596094eac5'/>
<id>94473f4db6a6f5f12d7c4081455b5b596094eac5</id>
<content type='text'>
Generate nuw GEPs for struct member accesses, as inbounds + non-negative
implies nuw.

Regression tests are updated using update scripts where possible, and by
find + replace where not.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Generate nuw GEPs for struct member accesses, as inbounds + non-negative
implies nuw.

Regression tests are updated using update scripts where possible, and by
find + replace where not.</pre>
</div>
</content>
</entry>
<entry>
<title>[clang] Use different memory layout type for _BitInt(N) in LLVM IR (#91364)</title>
<updated>2024-07-15T07:40:39+00:00</updated>
<author>
<name>Mariya Podchishchaeva</name>
<email>mariya.podchishchaeva@intel.com</email>
</author>
<published>2024-07-15T07:40:39+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=9ad72df55cb74b29193270c28f6974d2af8e0b71'/>
<id>9ad72df55cb74b29193270c28f6974d2af8e0b71</id>
<content type='text'>
There are two problems with _BitInt prior to this patch:
1. For at least some values of N, we cannot use LLVM's iN for the type
of struct elements, array elements, allocas, global variables, and so
on, because the LLVM layout for that type does not match the high-level
layout of _BitInt(N).
Example: Currently for i128:128 targets correct implementation is
possible either for __int128 or for _BitInt(129+) with lowering to iN,
but not both, since we have now correct implementation of __int128 in
place after a21abc7.
When this happens, opaque [M x i8] types used, where M =
sizeof(_BitInt(N)).
2. LLVM doesn't guarantee any particular extension behavior for integer
types that aren't a multiple of 8. For this reason, all _BitInt types
are now have in-memory representation that is a whole number of bytes.
I.e. for example _BitInt(17) now will have memory layout type i32.

This patch also introduces concept of load/store type and adds an API to
CodeGenTypes that returns the IR type that should be used for load and
store operations. This is particularly useful for the case when a
_BitInt ends up having array of bytes as memory layout type. For
_BitInt(N), let M = sizeof(_BitInt(N)), and let BITS = M * 8. Loads and
stores of iM would both (1) produce far better code from the backends
and (2) be far more optimizable by IR passes than loads and stores of [M
x i8].

Fixes https://github.com/llvm/llvm-project/issues/85139
Fixes https://github.com/llvm/llvm-project/issues/83419

---------

Co-authored-by: John McCall &lt;rjmccall@gmail.com&gt;</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
There are two problems with _BitInt prior to this patch:
1. For at least some values of N, we cannot use LLVM's iN for the type
of struct elements, array elements, allocas, global variables, and so
on, because the LLVM layout for that type does not match the high-level
layout of _BitInt(N).
Example: Currently for i128:128 targets correct implementation is
possible either for __int128 or for _BitInt(129+) with lowering to iN,
but not both, since we have now correct implementation of __int128 in
place after a21abc7.
When this happens, opaque [M x i8] types used, where M =
sizeof(_BitInt(N)).
2. LLVM doesn't guarantee any particular extension behavior for integer
types that aren't a multiple of 8. For this reason, all _BitInt types
are now have in-memory representation that is a whole number of bytes.
I.e. for example _BitInt(17) now will have memory layout type i32.

This patch also introduces concept of load/store type and adds an API to
CodeGenTypes that returns the IR type that should be used for load and
store operations. This is particularly useful for the case when a
_BitInt ends up having array of bytes as memory layout type. For
_BitInt(N), let M = sizeof(_BitInt(N)), and let BITS = M * 8. Loads and
stores of iM would both (1) produce far better code from the backends
and (2) be far more optimizable by IR passes than loads and stores of [M
x i8].

Fixes https://github.com/llvm/llvm-project/issues/85139
Fixes https://github.com/llvm/llvm-project/issues/83419

---------

Co-authored-by: John McCall &lt;rjmccall@gmail.com&gt;</pre>
</div>
</content>
</entry>
<entry>
<title>[CodeGen][LLVM] Make the `va_list` related intrinsics generic. (#85460)</title>
<updated>2024-03-27T11:41:34+00:00</updated>
<author>
<name>Alex Voicu</name>
<email>alexandru.voicu@amd.com</email>
</author>
<published>2024-03-27T11:41:34+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=ab7dba233a058cc8310ef829929238b5d8440b30'/>
<id>ab7dba233a058cc8310ef829929238b5d8440b30</id>
<content type='text'>
Currently, the builtins used for implementing `va_list` handling
unconditionally take their arguments as unqualified `ptr`s i.e. pointers
to AS 0. This does not work for targets where the default AS is not 0 or
AS 0 is not a viable AS (for example, a target might choose 0 to
represent the constant address space). This patch changes the builtins'
signature to take generic `anyptr` args, which corrects this issue. It
is noisy due to the number of tests affected. A test for an upstream
target which does not use 0 as its default AS (SPIRV for HIP device
compilations) is added as well.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Currently, the builtins used for implementing `va_list` handling
unconditionally take their arguments as unqualified `ptr`s i.e. pointers
to AS 0. This does not work for targets where the default AS is not 0 or
AS 0 is not a viable AS (for example, a target might choose 0 to
represent the constant address space). This patch changes the builtins'
signature to take generic `anyptr` args, which corrects this issue. It
is noisy due to the number of tests affected. A test for an upstream
target which does not use 0 as its default AS (SPIRV for HIP device
compilations) is added as well.</pre>
</div>
</content>
</entry>
<entry>
<title>Disallow _BitInt as an underlying type for an enumeration</title>
<updated>2023-10-19T18:02:29+00:00</updated>
<author>
<name>erichkeane</name>
<email>ekeane@nvidia.com</email>
</author>
<published>2023-10-19T17:59:34+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=5175cd777c57190ab9860c304796d386e4df9b8f'/>
<id>5175cd777c57190ab9860c304796d386e4df9b8f</id>
<content type='text'>
As mentioned in #69619, C23 6.7.2.2p5 explicitly prohibits using a
_BitInt as an underlying type to an enumeration. While we had this in
the _ExtInt implementation, the justification for that limitation in C
is compelling, so this is being removed to be compatible with the C23
standard.

Fixes: #69619
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
As mentioned in #69619, C23 6.7.2.2p5 explicitly prohibits using a
_BitInt as an underlying type to an enumeration. While we had this in
the _ExtInt implementation, the justification for that limitation in C
is compelling, so this is being removed to be compatible with the C23
standard.

Fixes: #69619
</pre>
</div>
</content>
</entry>
<entry>
<title>clang: Use ptrmask for pointer alignment</title>
<updated>2023-03-16T11:16:41+00:00</updated>
<author>
<name>Matt Arsenault</name>
<email>Matthew.Arsenault@amd.com</email>
</author>
<published>2023-01-12T14:33:37+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=8e009348e8a2e9c4577538eba6ca5c6cb286776f'/>
<id>8e009348e8a2e9c4577538eba6ca5c6cb286776f</id>
<content type='text'>
Avoid using ptrtoint/inttoptr.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Avoid using ptrtoint/inttoptr.
</pre>
</div>
</content>
</entry>
<entry>
<title>[IRBuilder] Use canonical i64 type for insertelement index used by vector splats.</title>
<updated>2023-01-11T14:08:06+00:00</updated>
<author>
<name>Paul Walker</name>
<email>paul.walker@arm.com</email>
</author>
<published>2023-01-04T11:45:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=eae26b6640afff715172d75fdee02e7df7530a9b'/>
<id>eae26b6640afff715172d75fdee02e7df7530a9b</id>
<content type='text'>
Instcombine prefers this canonical form (see getPreferredVectorIndex),
as does IRBuilder when passing the index as an integer so we may as
well use the prefered form from creation.

NOTE: All test changes are mechanical with nothing else expected
beyond a change of index type from i32 to i64.

Differential Revision: https://reviews.llvm.org/D140983
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Instcombine prefers this canonical form (see getPreferredVectorIndex),
as does IRBuilder when passing the index as an integer so we may as
well use the prefered form from creation.

NOTE: All test changes are mechanical with nothing else expected
beyond a change of index type from i32 to i64.

Differential Revision: https://reviews.llvm.org/D140983
</pre>
</div>
</content>
</entry>
</feed>
