Skip to content

Commit 8acb8a1

Browse files
committed
[RISCV] Make Zcf and Zcd imply the F and D extensions respectively
This was an omission in the spec that has now been addressed riscvarchive/riscv-code-size-reduction#224. Differential Revision: https://reviews.llvm.org/D156314
1 parent 24f320e commit 8acb8a1

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

llvm/lib/Support/RISCVISAInfo.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -956,9 +956,9 @@ static const char *ImpliedExtsXTHeadVdot[] = {"v"};
956956
static const char *ImpliedExtsXsfvcp[] = {"zve32x"};
957957
static const char *ImpliedExtsZacas[] = {"a"};
958958
static const char *ImpliedExtsZcb[] = {"zca"};
959-
static const char *ImpliedExtsZcd[] = {"zca"};
959+
static const char *ImpliedExtsZcd[] = {"d", "zca"};
960960
static const char *ImpliedExtsZce[] = {"zcb", "zcmp", "zcmt"};
961-
static const char *ImpliedExtsZcf[] = {"zca"};
961+
static const char *ImpliedExtsZcf[] = {"f", "zca"};
962962
static const char *ImpliedExtsZcmp[] = {"zca"};
963963
static const char *ImpliedExtsZcmt[] = {"zca"};
964964
static const char *ImpliedExtsZdinx[] = {"zfinx"};

llvm/test/CodeGen/RISCV/attributes.ll

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -231,8 +231,8 @@
231231
; RV32XTHEADSYNC: .attribute 5, "rv32i2p1_xtheadsync1p0"
232232
; RV32ZCA: .attribute 5, "rv32i2p1_zca1p0"
233233
; RV32ZCB: .attribute 5, "rv32i2p1_zca1p0_zcb1p0"
234-
; RV32ZCD: .attribute 5, "rv32i2p1_zca1p0_zcd1p0"
235-
; RV32ZCF: .attribute 5, "rv32i2p1_zca1p0_zcf1p0"
234+
; RV32ZCD: .attribute 5, "rv32i2p1_f2p2_d2p2_zicsr2p0_zca1p0_zcd1p0"
235+
; RV32ZCF: .attribute 5, "rv32i2p1_f2p2_zicsr2p0_zca1p0_zcf1p0"
236236
; RV32ZCMP: .attribute 5, "rv32i2p1_zca1p0_zcmp1p0"
237237
; RV32ZCMT: .attribute 5, "rv32i2p1_zicsr2p0_zca1p0_zcmt1p0"
238238
; RV32ZICSR: .attribute 5, "rv32i2p1_zicsr2p0"
@@ -319,7 +319,7 @@
319319
; RV64ZTSO: .attribute 5, "rv64i2p1_ztso0p1"
320320
; RV64ZCA: .attribute 5, "rv64i2p1_zca1p0"
321321
; RV64ZCB: .attribute 5, "rv64i2p1_zca1p0_zcb1p0"
322-
; RV64ZCD: .attribute 5, "rv64i2p1_zca1p0_zcd1p0"
322+
; RV64ZCD: .attribute 5, "rv64i2p1_f2p2_d2p2_zicsr2p0_zca1p0_zcd1p0"
323323
; RV64ZCMP: .attribute 5, "rv64i2p1_zca1p0_zcmp1p0"
324324
; RV64ZCMT: .attribute 5, "rv64i2p1_zicsr2p0_zca1p0_zcmt1p0"
325325
; RV64ZICSR: .attribute 5, "rv64i2p1_zicsr2p0"

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -229,10 +229,10 @@
229229
# CHECK: attribute 5, "rv32i2p1_zca1p0"
230230

231231
.attribute arch, "rv32izcd1p0"
232-
# CHECK: attribute 5, "rv32i2p1_zca1p0_zcd1p0"
232+
# CHECK: attribute 5, "rv32i2p1_f2p2_d2p2_zicsr2p0_zca1p0_zcd1p0"
233233

234234
.attribute arch, "rv32izcf1p0"
235-
# CHECK: attribute 5, "rv32i2p1_zca1p0_zcf1p0"
235+
# CHECK: attribute 5, "rv32i2p1_f2p2_zicsr2p0_zca1p0_zcf1p0"
236236

237237
.attribute arch, "rv32izcb1p0"
238238
# CHECK: attribute 5, "rv32i2p1_zca1p0_zcb1p0"

0 commit comments

Comments
 (0)