Skip to content

Commit 8a3db30

Browse files
committed
[Clang][RISCV] Type alignment for the type recording required extensions. NFC
1 parent 43eea72 commit 8a3db30

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

clang/include/clang/Support/RISCVVIntrinsicUtils.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -485,7 +485,8 @@ class RVVIntrinsic {
485485

486486
// RVVRequire should be sync'ed with target features, but only
487487
// required features used in riscv_vector.td.
488-
enum RVVRequire : uint16_t {
488+
using RVVRequireT = uint16_t;
489+
enum RVVRequire : RVVRequireT {
489490
RVV_REQ_None = 0,
490491
RVV_REQ_RV64 = 1 << 0,
491492
RVV_REQ_ZvfhminOrZvfh = 1 << 1,
@@ -536,7 +537,7 @@ struct RVVIntrinsicRecord {
536537
uint8_t OverloadedSuffixSize;
537538

538539
// Required target features for this intrinsic.
539-
uint16_t RequiredExtensions;
540+
RVVRequireT RequiredExtensions;
540541

541542
// Supported type, mask of BasicType.
542543
uint8_t TypeRangeMask;

clang/utils/TableGen/RISCVVEmitter.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ struct SemaRecord {
4646
unsigned Log2LMULMask;
4747

4848
// Required extensions for this intrinsic.
49-
unsigned RequiredExtensions;
49+
RVVRequireT RequiredExtensions;
5050

5151
// Prototype for this intrinsic.
5252
SmallVector<PrototypeDescriptor> Prototype;

0 commit comments

Comments
 (0)