brintos

brintos / llvm-project-archived public Read only

0
0
Text · 3.3 KiB · cc3bbfb Raw
66 lines · plain
1! -----------------------------------------------------------------------------2! Tests for the -msve-vector-bits flag (taken from the clang test)3! -----------------------------------------------------------------------------4 5! RUN: %flang -c %s -### --target=aarch64-none-linux-gnu -march=armv8-a+sve \6! RUN:  -msve-vector-bits=128 2>&1 | FileCheck --check-prefix=CHECK-128 %s7! RUN: %flang -c %s -### --target=aarch64-none-linux-gnu -march=armv8-a+sve \8! RUN:  -msve-vector-bits=256 2>&1 | FileCheck --check-prefix=CHECK-256 %s9! RUN: %flang -c %s -### --target=aarch64-none-linux-gnu -march=armv8-a+sve \10! RUN:  -msve-vector-bits=512 2>&1 | FileCheck --check-prefix=CHECK-512 %s11! RUN: %flang -c %s -### --target=aarch64-none-linux-gnu -march=armv8-a+sve \12! RUN:  -msve-vector-bits=1024 2>&1 | FileCheck --check-prefix=CHECK-1024 %s13! RUN: %flang -c %s -### --target=aarch64-none-linux-gnu -march=armv8-a+sve \14! RUN:  -msve-vector-bits=2048 2>&1 | FileCheck --check-prefix=CHECK-2048 %s15! RUN: %flang -c %s -### --target=aarch64-none-linux-gnu -march=armv8-a+sve \16! RUN:  -msve-vector-bits=128+ 2>&1 | FileCheck --check-prefix=CHECK-128P %s17! RUN: %flang -c %s -### --target=aarch64-none-linux-gnu -march=armv8-a+sve \18! RUN:  -msve-vector-bits=256+ 2>&1 | FileCheck --check-prefix=CHECK-256P %s19! RUN: %flang -c %s -### --target=aarch64-none-linux-gnu -march=armv8-a+sve \20! RUN:  -msve-vector-bits=512+ 2>&1 | FileCheck --check-prefix=CHECK-512P %s21! RUN: %flang -c %s -### --target=aarch64-none-linux-gnu -march=armv8-a+sve \22! RUN:  -msve-vector-bits=1024+ 2>&1 | FileCheck --check-prefix=CHECK-1024P %s23! RUN: %flang -c %s -### --target=aarch64-none-linux-gnu -march=armv8-a+sve \24! RUN:  -msve-vector-bits=2048+ 2>&1 | FileCheck --check-prefix=CHECK-2048P %s25! RUN: %flang -c %s -### --target=aarch64-none-linux-gnu -march=armv8-a+sve \26! RUN:  -msve-vector-bits=scalable 2>&1 | FileCheck --check-prefix=CHECK-SCALABLE %s27 28! CHECK-128: "-fc1"29! CHECK-128-SAME: "-mvscale-max=1" "-mvscale-min=1"30! CHECK-256: "-fc1"31! CHECK-256-SAME: "-mvscale-max=2" "-mvscale-min=2"32! CHECK-512: "-fc1"33! CHECK-512-SAME: "-mvscale-max=4" "-mvscale-min=4"34! CHECK-1024: "-fc1"35! CHECK-1024-SAME: "-mvscale-max=8" "-mvscale-min=8"36! CHECK-2048: "-fc1"37! CHECK-2048-SAME: "-mvscale-max=16" "-mvscale-min=16"38 39! CHECK-128P: "-fc1"40! CHECK-128P-SAME: "-mvscale-min=1"41! CHECK-128P-NOT: "-mvscale-max"42! CHECK-256P: "-fc1"43! CHECK-256P-SAME: "-mvscale-min=2"44! CHECK-256P-NOT: "-mvscale-max"45! CHECK-512P: "-fc1"46! CHECK-512P-SAME: "-mvscale-min=4"47! CHECK-512P-NOT: "-mvscale-max"48! CHECK-1024P: "-fc1"49! CHECK-1024P-SAME: "-mvscale-min=8"50! CHECK-1024P-NOT: "-mvscale-max"51! CHECK-2048P: "-fc1"52! CHECK-2048P-SAME: "-mvscale-min=16"53! CHECK-2048P-NOT: "-mvscale-max"54! CHECK-SCALABLE-NOT: "-mvscale-min=55! CHECK-SCALABLE-NOT: "-mvscale-max=56 57! Error out if an unsupported value is passed to -msve-vector-bits.58! -----------------------------------------------------------------------------59! RUN: not %flang -c %s -### --target=aarch64-none-linux-gnu -march=armv8-a+sve \60! RUN:  -msve-vector-bits=64 2>&1 | FileCheck --check-prefix=CHECK-BAD-VALUE-ERROR %s61! RUN: not %flang -c %s -### --target=aarch64-none-linux-gnu -march=armv8-a+sve \62! RUN:  -msve-vector-bits=A 2>&1 | FileCheck --check-prefix=CHECK-BAD-VALUE-ERROR %s63 64! CHECK-BAD-VALUE-ERROR: error: unsupported argument '{{.*}}' to option '-msve-vector-bits='65 66