Skip to content

Commit 9a9db2a

Browse files
authored
[RISCV] Prefix mcpu/mtune/march/mabi with '-' in comments. NFC (#148723)
1 parent 25b00c0 commit 9a9db2a

File tree

1 file changed

+17
-17
lines changed

1 file changed

+17
-17
lines changed

clang/test/Driver/riscv-cpus.c

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -287,7 +287,7 @@
287287
// RUN: %clang --target=riscv64 -### -c %s 2>&1 -mtune=xiangshan-nanhu | FileCheck -check-prefix=MTUNE-XIANGSHAN-NANHU %s
288288
// MTUNE-XIANGSHAN-NANHU: "-tune-cpu" "xiangshan-nanhu"
289289

290-
// Check mtune alias CPU has resolved to the right CPU according XLEN.
290+
// Check -mtune alias CPU has resolved to the right CPU according XLEN.
291291
// RUN: %clang --target=riscv32 -### -c %s 2>&1 -mtune=generic | FileCheck -check-prefix=MTUNE-GENERIC-32 %s
292292
// MTUNE-GENERIC-32: "-tune-cpu" "generic"
293293

@@ -304,107 +304,107 @@
304304
// RUN: %clang --target=riscv64 -### -c %s 2>&1 -mtune=native | FileCheck -check-prefix=MTUNE-NATIVE %s
305305
// MTUNE-NATIVE-NOT: "-tune-cpu" "native"
306306

307-
// mcpu with default march
307+
// -mcpu with default -march
308308
// RUN: %clang --target=riscv64 -### -c %s 2>&1 -mcpu=sifive-e20 | FileCheck -check-prefix=MCPU-SIFIVE-E20 %s
309309
// MCPU-SIFIVE-E20: "-nostdsysteminc" "-target-cpu" "sifive-e20"
310310
// MCPU-SIFIVE-E20: "-target-feature" "+m" "-target-feature" "+c"
311311
// MCPU-SIFIVE-E20: "-target-feature" "+zicsr" "-target-feature" "+zifencei"
312312
// MCPU-SIFIVE-E20: "-target-abi" "ilp32"
313313

314-
// mcpu with default march
314+
// -mcpu with default -march
315315
// RUN: %clang --target=riscv64 -### -c %s 2>&1 -mcpu=sifive-e21 | FileCheck -check-prefix=MCPU-SIFIVE-E21 %s
316316
// MCPU-SIFIVE-E21: "-nostdsysteminc" "-target-cpu" "sifive-e21"
317317
// MCPU-SIFIVE-E21: "-target-feature" "+m" "-target-feature" "+a" "-target-feature" "+c"
318318
// MCPU-SIFIVE-E21: "-target-feature" "+zicsr" "-target-feature" "+zifencei"
319319
// MCPU-SIFIVE-E21: "-target-abi" "ilp32"
320320

321-
// mcpu with default march
321+
// -mcpu with default -march
322322
// RUN: %clang --target=riscv64 -### -c %s 2>&1 -mcpu=sifive-e24 | FileCheck -check-prefix=MCPU-SIFIVE-E24 %s
323323
// MCPU-SIFIVE-E24: "-nostdsysteminc" "-target-cpu" "sifive-e24"
324324
// MCPU-SIFIVE-E24: "-target-feature" "+m" "-target-feature" "+a" "-target-feature" "+f"
325325
// MCPU-SIFIVE-E24: "-target-feature" "+c"
326326
// MCPU-SIFIVE-E24: "-target-feature" "+zicsr" "-target-feature" "+zifencei"
327327
// MCPU-SIFIVE-E24: "-target-abi" "ilp32f"
328328

329-
// mcpu with default march
329+
// -mcpu with default -march
330330
// RUN: %clang --target=riscv64 -### -c %s 2>&1 -mcpu=sifive-e34 | FileCheck -check-prefix=MCPU-SIFIVE-E34 %s
331331
// MCPU-SIFIVE-E34: "-nostdsysteminc" "-target-cpu" "sifive-e34"
332332
// MCPU-SIFIVE-E34: "-target-feature" "+m" "-target-feature" "+a" "-target-feature" "+f"
333333
// MCPU-SIFIVE-E34: "-target-feature" "+c"
334334
// MCPU-SIFIVE-E34: "-target-feature" "+zicsr" "-target-feature" "+zifencei"
335335
// MCPU-SIFIVE-E34: "-target-abi" "ilp32f"
336336

337-
// mcpu with mabi option
337+
// -mcpu with -mabi option
338338
// RUN: %clang --target=riscv64 -### -c %s 2>&1 -mcpu=sifive-s21 -mabi=lp64 | FileCheck -check-prefix=MCPU-ABI-SIFIVE-S21 %s
339339
// MCPU-ABI-SIFIVE-S21: "-nostdsysteminc" "-target-cpu" "sifive-s21"
340340
// MCPU-ABI-SIFIVE-S21: "-target-feature" "+m" "-target-feature" "+a"
341341
// MCPU-ABI-SIFIVE-S21: "-target-feature" "+c"
342342
// MCPU-ABI-SIFIVE-S21: "-target-feature" "+zicsr" "-target-feature" "+zifencei"
343343
// MCPU-ABI-SIFIVE-S21: "-target-abi" "lp64"
344344

345-
// mcpu with mabi option
345+
// -mcpu with -mabi option
346346
// RUN: %clang --target=riscv64 -### -c %s 2>&1 -mcpu=sifive-s51 -mabi=lp64 | FileCheck -check-prefix=MCPU-ABI-SIFIVE-S51 %s
347347
// MCPU-ABI-SIFIVE-S51: "-nostdsysteminc" "-target-cpu" "sifive-s51"
348348
// MCPU-ABI-SIFIVE-S51: "-target-feature" "+m" "-target-feature" "+a"
349349
// MCPU-ABI-SIFIVE-S51: "-target-feature" "+c"
350350
// MCPU-ABI-SIFIVE-S51: "-target-feature" "+zicsr" "-target-feature" "+zifencei"
351351
// MCPU-ABI-SIFIVE-S51: "-target-abi" "lp64"
352352

353-
// mcpu with default march
353+
// -mcpu with default -march
354354
// RUN: %clang --target=riscv64 -### -c %s 2>&1 -mcpu=sifive-s54 | FileCheck -check-prefix=MCPU-SIFIVE-S54 %s
355355
// MCPU-SIFIVE-S54: "-nostdsysteminc" "-target-cpu" "sifive-s54"
356356
// MCPU-SIFIVE-S54: "-target-feature" "+m" "-target-feature" "+a" "-target-feature" "+f" "-target-feature" "+d"
357357
// MCPU-SIFIVE-S54: "-target-feature" "+c"
358358
// MCPU-SIFIVE-S54: "-target-feature" "+zicsr" "-target-feature" "+zifencei"
359359
// MCPU-SIFIVE-S54: "-target-abi" "lp64d"
360360

361-
// mcpu with mabi option
361+
// -mcpu with -mabi option
362362
// RUN: %clang --target=riscv64 -### -c %s 2>&1 -mcpu=sifive-s76 | FileCheck -check-prefix=MCPU-SIFIVE-S76 %s
363363
// MCPU-SIFIVE-S76: "-nostdsysteminc" "-target-cpu" "sifive-s76"
364364
// MCPU-SIFIVE-S76: "-target-feature" "+m" "-target-feature" "+a" "-target-feature" "+f" "-target-feature" "+d"
365365
// MCPU-SIFIVE-S76: "-target-feature" "+c"
366366
// MCPU-SIFIVE-S76: "-target-feature" "+zicsr" "-target-feature" "+zifencei" "-target-feature" "+zihintpause"
367367
// MCPU-SIFIVE-S76: "-target-abi" "lp64d"
368368

369-
// mcpu with default march
369+
// -mcpu with default -march
370370
// RUN: %clang --target=riscv64 -### -c %s 2>&1 -mcpu=sifive-u54 | FileCheck -check-prefix=MCPU-SIFIVE-U54 %s
371371
// MCPU-SIFIVE-U54: "-nostdsysteminc" "-target-cpu" "sifive-u54"
372372
// MCPU-SIFIVE-U54: "-target-feature" "+m" "-target-feature" "+a" "-target-feature" "+f" "-target-feature" "+d"
373373
// MCPU-SIFIVE-U54: "-target-feature" "+c"
374374
// MCPU-SIFIVE-U54: "-target-feature" "+zicsr" "-target-feature" "+zifencei"
375375
// MCPU-SIFIVE-U54: "-target-abi" "lp64d"
376376

377-
// mcpu with mabi option
377+
// -mcpu with -mabi option
378378
// RUN: %clang --target=riscv64 -### -c %s 2>&1 -mcpu=sifive-u54 -mabi=lp64 | FileCheck -check-prefix=MCPU-ABI-SIFIVE-U54 %s
379379
// MCPU-ABI-SIFIVE-U54: "-nostdsysteminc" "-target-cpu" "sifive-u54"
380380
// MCPU-ABI-SIFIVE-U54: "-target-feature" "+m" "-target-feature" "+a" "-target-feature" "+f" "-target-feature" "+d"
381381
// MCPU-ABI-SIFIVE-U54: "-target-feature" "+c"
382382
// MCPU-ABI-SIFIVE-U54: "-target-feature" "+zicsr" "-target-feature" "+zifencei"
383383
// MCPU-ABI-SIFIVE-U54: "-target-abi" "lp64"
384384

385-
// mcpu with default march
385+
// -mcpu with default -march
386386
// RUN: %clang --target=riscv64 -### -c %s 2>&1 -mcpu=sifive-e76 | FileCheck -check-prefix=MCPU-SIFIVE-E76 %s
387387
// MCPU-SIFIVE-E76: "-nostdsysteminc" "-target-cpu" "sifive-e76"
388388
// MCPU-SIFIVE-E76: "-target-feature" "+m" "-target-feature" "+a" "-target-feature" "+f"
389389
// MCPU-SIFIVE-E76: "-target-feature" "+c"
390390
// MCPU-SIFIVE-E76: "-target-feature" "+zicsr" "-target-feature" "+zifencei"
391391
// MCPU-SIFIVE-E76: "-target-abi" "ilp32f"
392392

393-
// mcpu with mabi option
393+
// -mcpu with -mabi option
394394
// RUN: %clang --target=riscv64 -### -c %s 2>&1 -mcpu=sifive-u74 -mabi=lp64 | FileCheck -check-prefix=MCPU-ABI-SIFIVE-U74 %s
395395
// MCPU-ABI-SIFIVE-U74: "-nostdsysteminc" "-target-cpu" "sifive-u74"
396396
// MCPU-ABI-SIFIVE-U74: "-target-feature" "+m" "-target-feature" "+a" "-target-feature" "+f" "-target-feature" "+d"
397397
// MCPU-ABI-SIFIVE-U74: "-target-feature" "+c"
398398
// MCPU-ABI-SIFIVE-U74: "-target-feature" "+zicsr" "-target-feature" "+zifencei"
399399
// MCPU-ABI-SIFIVE-U74: "-target-abi" "lp64"
400400

401-
// march overwrite mcpu's default march
401+
// -march overwrite -mcpu's default -march
402402
// RUN: %clang --target=riscv32 -### -c %s 2>&1 -mcpu=sifive-e31 -march=rv32imc | FileCheck -check-prefix=MCPU-MARCH %s
403403
// MCPU-MARCH: "-nostdsysteminc" "-target-cpu" "sifive-e31" "-target-feature" "+m" "-target-feature" "+c"
404404
// MCPU-MARCH: "-target-abi" "ilp32"
405405

406-
// Check interaction between mcpu and mtune, mtune won't affect arch related
407-
// target feature, but mcpu will.
406+
// Check interaction between -mcpu and mtune, -mtune won't affect arch related
407+
// target feature, but -mcpu will.
408408
//
409409
// In this case, sifive-e31 is rv32imac, sifive-e76 is rv32imafc, so F-extension
410410
// should not enabled.
@@ -418,7 +418,7 @@
418418
// MTUNE-E31-MCPU-E76-SAME: "-target-feature" "+zicsr" "-target-feature" "+zifencei"
419419
// MTUNE-E31-MCPU-E76-SAME: "-tune-cpu" "sifive-e76"
420420

421-
// mcpu with default march include experimental extensions
421+
// -mcpu with default -march include experimental extensions
422422
// RUN: %clang -target riscv64 -### -c %s 2>&1 -menable-experimental-extensions -mcpu=sifive-x280 | FileCheck -check-prefix=MCPU-SIFIVE-X280 %s
423423
// MCPU-SIFIVE-X280: "-nostdsysteminc" "-target-cpu" "sifive-x280"
424424
// MCPU-SIFIVE-X280-SAME: "-target-feature" "+m" "-target-feature" "+a" "-target-feature" "+f" "-target-feature" "+d"

0 commit comments

Comments
 (0)