File: riscv-rvv-vector-bits.f90

package info (click to toggle)
llvm-toolchain-19 1%3A19.1.7-3
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 1,998,520 kB
  • sloc: cpp: 6,951,680; ansic: 1,486,157; asm: 913,598; python: 232,024; f90: 80,126; objc: 75,281; lisp: 37,276; pascal: 16,990; sh: 10,009; ml: 5,058; perl: 4,724; awk: 3,523; makefile: 3,167; javascript: 2,504; xml: 892; fortran: 664; cs: 573
file content (51 lines) | stat: -rw-r--r-- 2,952 bytes parent folder | download | duplicates (11)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
! -----------------------------------------------------------------------------
! Tests for the -mrvv-vector-bits flag (taken from the clang test)
! -----------------------------------------------------------------------------

! RUN: %flang -c %s -### --target=riscv64-linux-gnu -march=rv64gc_zve64x \
! RUN:  -mrvv-vector-bits=128 2>&1 | FileCheck --check-prefix=CHECK-128 %s
! RUN: %flang -c %s -### --target=riscv64-linux-gnu -march=rv64gc_zve64x \
! RUN:  -mrvv-vector-bits=256 2>&1 | FileCheck --check-prefix=CHECK-256 %s
! RUN: %flang -c %s -### --target=riscv64-linux-gnu -march=rv64gc_zve64x \
! RUN:  -mrvv-vector-bits=512 2>&1 | FileCheck --check-prefix=CHECK-512 %s
! RUN: %flang -c %s -### --target=riscv64-linux-gnu -march=rv64gc_zve64x \
! RUN:  -mrvv-vector-bits=1024 2>&1 | FileCheck --check-prefix=CHECK-1024 %s
! RUN: %flang -c %s -### --target=riscv64-linux-gnu -march=rv64gc_zve64x \
! RUN:  -mrvv-vector-bits=2048 2>&1 | FileCheck --check-prefix=CHECK-2048 %s
! RUN: %flang -c %s -### --target=riscv64-linux-gnu -march=rv64gc_zve64x \
! RUN:  -mrvv-vector-bits=scalable 2>&1 | FileCheck --check-prefix=CHECK-SCALABLE %s

! RUN: %flang -c %s -### --target=riscv64-linux-gnu -march=rv64gcv_zvl256b \
! RUN:  -mrvv-vector-bits=zvl 2>&1 | FileCheck --check-prefix=CHECK-256 %s
! RUN: %flang -c %s -### --target=riscv64-linux-gnu -march=rv64gcv_zvl512b \
! RUN:  -mrvv-vector-bits=zvl 2>&1 | FileCheck --check-prefix=CHECK-512 %s

! CHECK-128: "-fc1"
! CHECK-128-SAME: "-mvscale-max=2" "-mvscale-min=2"
! CHECK-256: "-fc1"
! CHECK-256-SAME: "-mvscale-max=4" "-mvscale-min=4"
! CHECK-512: "-fc1"
! CHECK-512-SAME: "-mvscale-max=8" "-mvscale-min=8"
! CHECK-1024: "-fc1"
! CHECK-1024-SAME: "-mvscale-max=16" "-mvscale-min=16"
! CHECK-2048: "-fc1"
! CHECK-2048-SAME: "-mvscale-max=32" "-mvscale-min=32"

! CHECK-SCALABLE-NOT: "-mvscale-min=
! CHECK-SCALABLE-NOT: "-mvscale-max=

! Error out if an unsupported value is passed to -mrvv-vector-bits.
! -----------------------------------------------------------------------------
! RUN: not %flang -c %s -### --target=riscv64-linux-gnu -march=rv64gc_zve64x \
! RUN:  -mrvv-vector-bits=16 2>&1 | FileCheck --check-prefix=CHECK-BAD-VALUE-ERROR %s
! RUN: not %flang -c %s -### --target=riscv64-linux-gnu -march=rv64gc_zve64x \
! RUN:  -mrvv-vector-bits=A 2>&1 | FileCheck --check-prefix=CHECK-BAD-VALUE-ERROR %s
! RUN: not %flang -c %s -### --target=riscv64-linux-gnu -march=rv64gc_zve64x \
! RUN:  -mrvv-vector-bits=131072 2>&1 | FileCheck --check-prefix=CHECK-BAD-VALUE-ERROR %s
! RUN: not %flang -c %s -### --target=riscv64-linux-gnu -march=rv64gc \
! RUN:  -mrvv-vector-bits=zvl 2>&1 | FileCheck --check-prefix=CHECK-BAD-VALUE-ERROR %s
! RUN: not %flang -c %s -### --target=riscv64-linux-gnu -march=rv64gcv \
! RUN:  -mrvv-vector-bits=64 2>&1 | FileCheck --check-prefix=CHECK-BAD-VALUE-ERROR %s
!
! CHECK-BAD-VALUE-ERROR: error: unsupported argument '{{.*}}' to option '-mrvv-vector-bits='