Skip to content

Commit b83b287

Browse files
authored
[RISCV] Make Zhinx and Zvfh imply Zhinxmin and Zvfhmin respectively (llvm#75735)
Zhinxmin is a subset of Zhinx and Zvfhmin is also a subset of Zvfh.
1 parent 5c1f441 commit b83b287

File tree

3 files changed

+7
-3
lines changed

3 files changed

+7
-3
lines changed

llvm/lib/Support/RISCVISAInfo.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1014,7 +1014,7 @@ static const char *ImpliedExtsZfbfmin[] = {"f"};
10141014
static const char *ImpliedExtsZfh[] = {"zfhmin"};
10151015
static const char *ImpliedExtsZfhmin[] = {"f"};
10161016
static const char *ImpliedExtsZfinx[] = {"zicsr"};
1017-
static const char *ImpliedExtsZhinx[] = {"zfinx"};
1017+
static const char *ImpliedExtsZhinx[] = {"zhinxmin"};
10181018
static const char *ImpliedExtsZhinxmin[] = {"zfinx"};
10191019
static const char *ImpliedExtsZicntr[] = {"zicsr"};
10201020
static const char *ImpliedExtsZihpm[] = {"zicsr"};
@@ -1030,7 +1030,7 @@ static const char *ImpliedExtsZve64f[] = {"zve64x", "zve32f"};
10301030
static const char *ImpliedExtsZve64x[] = {"zve32x", "zvl64b"};
10311031
static const char *ImpliedExtsZvfbfmin[] = {"zve32f", "zfbfmin"};
10321032
static const char *ImpliedExtsZvfbfwma[] = {"zvfbfmin"};
1033-
static const char *ImpliedExtsZvfh[] = {"zve32f", "zfhmin"};
1033+
static const char *ImpliedExtsZvfh[] = {"zvfhmin", "zfhmin"};
10341034
static const char *ImpliedExtsZvfhmin[] = {"zve32f"};
10351035
static const char *ImpliedExtsZvkn[] = {"zvkb", "zvkned", "zvknhb", "zvkt"};
10361036
static const char *ImpliedExtsZvknc[] = {"zvbc", "zvkn"};

llvm/test/CodeGen/RISCV/attributes.ll

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,7 @@
8282
; RUN: llc -mtriple=riscv32 -mattr=+zve64x -mattr=+experimental-zvksg %s -o - | FileCheck --check-prefix=RV32ZVKSG %s
8383
; RUN: llc -mtriple=riscv32 -mattr=+zve32x -mattr=+experimental-zvksh %s -o - | FileCheck --check-prefix=RV32ZVKSH %s
8484
; RUN: llc -mtriple=riscv32 -mattr=+zve32x -mattr=+experimental-zvkt %s -o - | FileCheck --check-prefix=RV32ZVKT %s
85+
; RUN: llc -mtriple=riscv32 -mattr=+zvfh %s -o - | FileCheck --check-prefix=RV32ZVFH %s
8586
; RUN: llc -mtriple=riscv32 -mattr=+experimental-zicond %s -o - | FileCheck --check-prefix=RV32ZICOND %s
8687
; RUN: llc -mtriple=riscv32 -mattr=+smaia %s -o - | FileCheck --check-prefixes=CHECK,RV32SMAIA %s
8788
; RUN: llc -mtriple=riscv32 -mattr=+ssaia %s -o - | FileCheck --check-prefixes=CHECK,RV32SSAIA %s
@@ -172,6 +173,7 @@
172173
; RUN: llc -mtriple=riscv64 -mattr=+zve32x -mattr=+experimental-zvksg %s -o - | FileCheck --check-prefix=RV64ZVKSG %s
173174
; RUN: llc -mtriple=riscv64 -mattr=+zve32x -mattr=+experimental-zvksh %s -o - | FileCheck --check-prefix=RV64ZVKSH %s
174175
; RUN: llc -mtriple=riscv64 -mattr=+zve32x -mattr=+experimental-zvkt %s -o - | FileCheck --check-prefix=RV64ZVKT %s
176+
; RUN: llc -mtriple=riscv64 -mattr=+zvfh %s -o - | FileCheck --check-prefix=RV64ZVFH %s
175177
; RUN: llc -mtriple=riscv64 -mattr=+experimental-zicond %s -o - | FileCheck --check-prefix=RV64ZICOND %s
176178
; RUN: llc -mtriple=riscv64 -mattr=+smaia %s -o - | FileCheck --check-prefixes=CHECK,RV64SMAIA %s
177179
; RUN: llc -mtriple=riscv64 -mattr=+ssaia %s -o - | FileCheck --check-prefixes=CHECK,RV64SSAIA %s
@@ -264,6 +266,7 @@
264266
; RV32ZVKSG: .attribute 5, "rv32i2p1_zicsr2p0_zve32x1p0_zve64x1p0_zvkb1p0_zvkg1p0_zvks1p0_zvksed1p0_zvksg1p0_zvksh1p0_zvkt1p0_zvl32b1p0_zvl64b1p0"
265267
; RV32ZVKSH: .attribute 5, "rv32i2p1_zicsr2p0_zve32x1p0_zvksh1p0_zvl32b1p0"
266268
; RV32ZVKT: .attribute 5, "rv32i2p1_zicsr2p0_zve32x1p0_zvkt1p0_zvl32b1p0"
269+
; RV32ZVFH: .attribute 5, "rv32i2p1_f2p2_zicsr2p0_zfhmin1p0_zve32f1p0_zve32x1p0_zvfh1p0_zvfhmin1p0_zvl32b1p0"
267270
; RV32ZICOND: .attribute 5, "rv32i2p1_zicond1p0"
268271
; RV32SMAIA: .attribute 5, "rv32i2p1_smaia1p0"
269272
; RV32SSAIA: .attribute 5, "rv32i2p1_ssaia1p0"
@@ -353,6 +356,7 @@
353356
; RV64ZVKSG: .attribute 5, "rv64i2p1_zicsr2p0_zve32x1p0_zvkb1p0_zvkg1p0_zvks1p0_zvksed1p0_zvksg1p0_zvksh1p0_zvkt1p0_zvl32b1p0"
354357
; RV64ZVKSH: .attribute 5, "rv64i2p1_zicsr2p0_zve32x1p0_zvksh1p0_zvl32b1p0"
355358
; RV64ZVKT: .attribute 5, "rv64i2p1_zicsr2p0_zve32x1p0_zvkt1p0_zvl32b1p0"
359+
; RV64ZVFH: .attribute 5, "rv64i2p1_f2p2_zicsr2p0_zfhmin1p0_zve32f1p0_zve32x1p0_zvfh1p0_zvfhmin1p0_zvl32b1p0"
356360
; RV64ZICOND: .attribute 5, "rv64i2p1_zicond1p0"
357361
; RV64SMAIA: .attribute 5, "rv64i2p1_smaia1p0"
358362
; RV64SSAIA: .attribute 5, "rv64i2p1_ssaia1p0"

llvm/test/MC/RISCV/attribute-arch.s

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@
178178
# CHECK: attribute 5, "rv32i2p1_zicsr2p0_zfinx1p0_zhinxmin1p0"
179179

180180
.attribute arch, "rv32izfinx_zhinx1p0"
181-
# CHECK: attribute 5, "rv32i2p1_zicsr2p0_zfinx1p0_zhinx1p0"
181+
# CHECK: attribute 5, "rv32i2p1_zicsr2p0_zfinx1p0_zhinx1p0_zhinxmin1p0"
182182

183183
.attribute arch, "rv32i_zbkb1p0"
184184
# CHECK: attribute 5, "rv32i2p1_zbkb1p0"

0 commit comments

Comments
 (0)