Skip to content

Commit 898d6eb

Browse files
authored
[RISCV] Use RVA22U64Features in the definition of sifive-p450 and sifive-p670. (#102350)
This matches sifive-p470. RVA22U64Features includes the Zicntr extension which was not present for these CPUs before. I believe that was a mistake due to weird history of the Zicntr extension. I've updated the p470 test accordingly since this was missed there too.
1 parent 29e849b commit 898d6eb

File tree

2 files changed

+9
-48
lines changed

2 files changed

+9
-48
lines changed

clang/test/Driver/riscv-cpus.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -292,6 +292,7 @@
292292
// MCPU-SIFIVE-P450-SAME: "-target-feature" "+ziccif"
293293
// MCPU-SIFIVE-P450-SAME: "-target-feature" "+zicclsm"
294294
// MCPU-SIFIVE-P450-SAME: "-target-feature" "+ziccrse"
295+
// MCPU-SIFIVE-P450-SAME: "-target-feature" "+zicntr"
295296
// MCPU-SIFIVE-P450-SAME: "-target-feature" "+zicsr"
296297
// MCPU-SIFIVE-P450-SAME: "-target-feature" "+zifencei"
297298
// MCPU-SIFIVE-P450-SAME: "-target-feature" "+zihintntl"
@@ -320,6 +321,7 @@
320321
// MCPU-SIFIVE-P470-SAME: "-target-feature" "+ziccif"
321322
// MCPU-SIFIVE-P470-SAME: "-target-feature" "+zicclsm"
322323
// MCPU-SIFIVE-P470-SAME: "-target-feature" "+ziccrse"
324+
// MCPU-SIFIVE-P470-SAME: "-target-feature" "+zicntr"
323325
// MCPU-SIFIVE-P470-SAME: "-target-feature" "+zicsr"
324326
// MCPU-SIFIVE-P470-SAME: "-target-feature" "+zifencei"
325327
// MCPU-SIFIVE-P470-SAME: "-target-feature" "+zihintntl"
@@ -368,6 +370,7 @@
368370
// MCPU-SIFIVE-P670-SAME: "-target-feature" "+ziccif"
369371
// MCPU-SIFIVE-P670-SAME: "-target-feature" "+zicclsm"
370372
// MCPU-SIFIVE-P670-SAME: "-target-feature" "+ziccrse"
373+
// MCPU-SIFIVE-P670-SAME: "-target-feature" "+zicntr"
371374
// MCPU-SIFIVE-P670-SAME: "-target-feature" "+zicsr"
372375
// MCPU-SIFIVE-P670-SAME: "-target-feature" "+zifencei"
373376
// MCPU-SIFIVE-P670-SAME: "-target-feature" "+zihintntl"

llvm/lib/Target/RISCV/RISCVProcessors.td

Lines changed: 6 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -246,32 +246,11 @@ defvar SiFiveP400TuneFeatures = [TuneNoDefaultUnroll,
246246
FeaturePostRAScheduler];
247247

248248
def SIFIVE_P450 : RISCVProcessorModel<"sifive-p450", SiFiveP400Model,
249-
[Feature64Bit,
250-
FeatureStdExtI,
251-
FeatureStdExtZifencei,
252-
FeatureStdExtM,
253-
FeatureStdExtA,
254-
FeatureStdExtF,
255-
FeatureStdExtD,
256-
FeatureStdExtC,
257-
FeatureStdExtZa64rs,
258-
FeatureStdExtZic64b,
259-
FeatureStdExtZicbop,
260-
FeatureStdExtZicbom,
261-
FeatureStdExtZicboz,
262-
FeatureStdExtZiccamoa,
263-
FeatureStdExtZiccif,
264-
FeatureStdExtZicclsm,
265-
FeatureStdExtZiccrse,
249+
!listconcat(RVA22U64Features,
250+
[FeatureStdExtZifencei,
266251
FeatureStdExtZihintntl,
267-
FeatureStdExtZihintpause,
268-
FeatureStdExtZihpm,
269-
FeatureStdExtZba,
270-
FeatureStdExtZbb,
271-
FeatureStdExtZbs,
272-
FeatureStdExtZfhmin,
273252
FeatureUnalignedScalarMem,
274-
FeatureUnalignedVectorMem],
253+
FeatureUnalignedVectorMem]),
275254
SiFiveP400TuneFeatures>;
276255

277256
def SIFIVE_P470 : RISCVProcessorModel<"sifive-p470", SiFiveP400Model,
@@ -294,39 +273,18 @@ def SIFIVE_P470 : RISCVProcessorModel<"sifive-p470", SiFiveP400Model,
294273

295274

296275
def SIFIVE_P670 : RISCVProcessorModel<"sifive-p670", SiFiveP600Model,
297-
[Feature64Bit,
298-
FeatureStdExtI,
276+
!listconcat(RVA22U64Features,
277+
[FeatureStdExtV,
299278
FeatureStdExtZifencei,
300-
FeatureStdExtM,
301-
FeatureStdExtA,
302-
FeatureStdExtF,
303-
FeatureStdExtD,
304-
FeatureStdExtC,
305-
FeatureStdExtZa64rs,
306-
FeatureStdExtZic64b,
307-
FeatureStdExtZicbop,
308-
FeatureStdExtZicbom,
309-
FeatureStdExtZicboz,
310-
FeatureStdExtZiccamoa,
311-
FeatureStdExtZiccif,
312-
FeatureStdExtZicclsm,
313-
FeatureStdExtZiccrse,
314279
FeatureStdExtZihintntl,
315-
FeatureStdExtZihintpause,
316-
FeatureStdExtZihpm,
317-
FeatureStdExtZba,
318-
FeatureStdExtZbb,
319-
FeatureStdExtZbs,
320-
FeatureStdExtZfhmin,
321-
FeatureStdExtV,
322280
FeatureStdExtZvl128b,
323281
FeatureStdExtZvbb,
324282
FeatureStdExtZvknc,
325283
FeatureStdExtZvkng,
326284
FeatureStdExtZvksc,
327285
FeatureStdExtZvksg,
328286
FeatureUnalignedScalarMem,
329-
FeatureUnalignedVectorMem],
287+
FeatureUnalignedVectorMem]),
330288
[TuneNoDefaultUnroll,
331289
TuneConditionalCompressedMoveFusion,
332290
TuneLUIADDIFusion,

0 commit comments

Comments
 (0)