Skip to content

Commit 8350d9c

Browse files
committed
[RISCV] Sync RISCVFeatures.td implies list with RISCVISAInfo.cpp.
This makes Zcf imply F and Zcd imply D in RISCVFeatures.td. They were already implied in RISCISAInfo.cpp. Some test RUN lines had to be removed because they were testing that Zcf without F or Zcd without D would reject some instructions.
1 parent 286bd42 commit 8350d9c

File tree

4 files changed

+4
-14
lines changed

4 files changed

+4
-14
lines changed

llvm/lib/Target/RISCV/RISCVFeatures.td

+4-5
Original file line numberDiff line numberDiff line change
@@ -391,7 +391,7 @@ def HasStdExtZcb : Predicate<"Subtarget->hasStdExtZcb()">,
391391
def FeatureStdExtZcd
392392
: RISCVExtension<"zcd", 1, 0,
393393
"'Zcd' (Compressed Double-Precision Floating-Point Instructions)",
394-
[FeatureStdExtZca]>;
394+
[FeatureStdExtD, FeatureStdExtZca]>;
395395

396396
def HasStdExtCOrZcd
397397
: Predicate<"Subtarget->hasStdExtCOrZcd()">,
@@ -402,7 +402,7 @@ def HasStdExtCOrZcd
402402
def FeatureStdExtZcf
403403
: RISCVExtension<"zcf", 1, 0,
404404
"'Zcf' (Compressed Single-Precision Floating-Point Instructions)",
405-
[FeatureStdExtZca]>;
405+
[FeatureStdExtF, FeatureStdExtZca]>;
406406

407407
def FeatureStdExtZcmp
408408
: RISCVExtension<"zcmp", 1, 0,
@@ -423,8 +423,7 @@ def HasStdExtZcmt : Predicate<"Subtarget->hasStdExtZcmt()">,
423423
def FeatureStdExtZce
424424
: RISCVExtension<"zce", 1, 0,
425425
"'Zce' (Compressed extensions for microcontrollers)",
426-
[FeatureStdExtZca, FeatureStdExtZcb, FeatureStdExtZcmp,
427-
FeatureStdExtZcmt]>;
426+
[FeatureStdExtZcb, FeatureStdExtZcmp, FeatureStdExtZcmt]>;
428427

429428
def HasStdExtCOrZcfOrZce
430429
: Predicate<"Subtarget->hasStdExtC() || Subtarget->hasStdExtZcf() "
@@ -1088,7 +1087,7 @@ def HasVendorXSfvqmaccqoq
10881087
def FeatureVendorXSfvfwmaccqqq
10891088
: RISCVExtension<"xsfvfwmaccqqq", 1, 0,
10901089
"'XSfvfwmaccqqq' (SiFive Matrix Multiply Accumulate Instruction and 4-by-4))",
1091-
[FeatureStdExtZve32f, FeatureStdExtZvfbfmin]>;
1090+
[FeatureStdExtZvfbfmin]>;
10921091
def HasVendorXSfvfwmaccqqq
10931092
: Predicate<"Subtarget->hasVendorXSfvfwmaccqqq()">,
10941093
AssemblerPredicate<(all_of FeatureVendorXSfvfwmaccqqq),

llvm/test/MC/RISCV/rv32dc-valid.s

-3
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,6 @@
1212
# RUN: not llvm-mc -triple riscv32 -mattr=+c \
1313
# RUN: -riscv-no-aliases -show-encoding < %s 2>&1 \
1414
# RUN: | FileCheck -check-prefixes=CHECK-NO-EXT-D %s
15-
# RUN: not llvm-mc -triple riscv32 -mattr=+zcd \
16-
# RUN: -riscv-no-aliases -show-encoding < %s 2>&1 \
17-
# RUN: | FileCheck -check-prefixes=CHECK-NO-EXT-D %s
1815
# RUN: not llvm-mc -triple riscv32 -riscv-no-aliases -show-encoding < %s 2>&1 \
1916
# RUN: | FileCheck -check-prefixes=CHECK-NO-EXT-DC %s
2017

llvm/test/MC/RISCV/rv32fc-valid.s

-3
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,6 @@
1212
# RUN: not llvm-mc -triple riscv32 -mattr=+c \
1313
# RUN: -riscv-no-aliases -show-encoding < %s 2>&1 \
1414
# RUN: | FileCheck -check-prefixes=CHECK-NO-EXT-F %s
15-
# RUN: not llvm-mc -triple riscv32 -mattr=+zcf \
16-
# RUN: -riscv-no-aliases -show-encoding < %s 2>&1 \
17-
# RUN: | FileCheck -check-prefixes=CHECK-NO-EXT-F %s
1815
# RUN: not llvm-mc -triple riscv32 \
1916
# RUN: -riscv-no-aliases -show-encoding < %s 2>&1 \
2017
# RUN: | FileCheck -check-prefixes=CHECK-NO-EXT-FC %s

llvm/test/MC/RISCV/rv64dc-valid.s

-3
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,6 @@
1212
# RUN: not llvm-mc -triple riscv64 -mattr=+c \
1313
# RUN: -riscv-no-aliases -show-encoding < %s 2>&1 \
1414
# RUN: | FileCheck -check-prefixes=CHECK-NO-EXT-D %s
15-
# RUN: not llvm-mc -triple riscv64 -mattr=+zcd \
16-
# RUN: -riscv-no-aliases -show-encoding < %s 2>&1 \
17-
# RUN: | FileCheck -check-prefixes=CHECK-NO-EXT-D %s
1815
# RUN: not llvm-mc -triple riscv64 -riscv-no-aliases -show-encoding < %s 2>&1 \
1916
# RUN: | FileCheck -check-prefixes=CHECK-NO-EXT-DC %s
2017

0 commit comments

Comments
 (0)