[all-commits] [llvm/llvm-project] 6e58e9: [Clang] [Sema] Reject non-power-of-2 `_BitInt` mat...
Sirraide via All-commits
all-commits at lists.llvm.org
Mon Dec 16 17:07:50 PST 2024
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 6e58e99a07facd73547f7fa1a6f8c0719d8af30d
https://github.com/llvm/llvm-project/commit/6e58e99a07facd73547f7fa1a6f8c0719d8af30d
Author: Sirraide <aeternalmail at gmail.com>
Date: 2024-12-17 (Tue, 17 Dec 2024)
Changed paths:
M clang/docs/MatrixTypes.rst
M clang/docs/ReleaseNotes.rst
M clang/include/clang/Basic/DiagnosticSemaKinds.td
M clang/lib/Sema/SemaType.cpp
A clang/test/CodeGenCXX/matrix-vector-bit-int.cpp
M clang/test/SemaCXX/matrix-type.cpp
Log Message:
-----------
[Clang] [Sema] Reject non-power-of-2 `_BitInt` matrix element types (#117487)
Essentially, this makes this ill-formed:
```c++
using mat4 = _BitInt(12) [[clang::matrix_type(3, 3)]];
```
This matches preexisting behaviour for vector types (e.g.
`ext_vector_type`), and given that LLVM IR intrinsics for matrices also
take vector types, it seems like a sensible thing to do.
This is currently especially problematic since we sometimes lower matrix
types to LLVM array types instead, and while e.g. `[4 x i32]` and `<4 x
i32>` *probably* have the same similar memory layout (though I don’t
think it’s sound to rely on that either, see #117486), `[4 x i12]` and
`<4 x i12>` definitely don’t.
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list