Richard Sandiford | 4652d89 | 2013-07-19 16:51:51 +0000 | [diff] [blame] | 1 | // Check that -march works for all supported targets. |
| 2 | |
| 3 | // RUN: not %clang -target s390x -S -emit-llvm -march=z9 %s -o - 2>&1 | FileCheck --check-prefix=CHECK-Z9 %s |
Benjamin Kramer | 875356a | 2013-07-19 17:49:21 +0000 | [diff] [blame] | 4 | // RUN: %clang -target s390x -### -S -emit-llvm -march=z10 %s 2>&1 | FileCheck --check-prefix=CHECK-Z10 %s |
Ulrich Weigand | 30354eb | 2016-10-31 14:38:05 +0000 | [diff] [blame] | 5 | // RUN: %clang -target s390x -### -S -emit-llvm -march=arch8 %s 2>&1 | FileCheck --check-prefix=CHECK-ARCH8 %s |
Benjamin Kramer | 875356a | 2013-07-19 17:49:21 +0000 | [diff] [blame] | 6 | // RUN: %clang -target s390x -### -S -emit-llvm -march=z196 %s 2>&1 | FileCheck --check-prefix=CHECK-Z196 %s |
Ulrich Weigand | 30354eb | 2016-10-31 14:38:05 +0000 | [diff] [blame] | 7 | // RUN: %clang -target s390x -### -S -emit-llvm -march=arch9 %s 2>&1 | FileCheck --check-prefix=CHECK-ARCH9 %s |
Benjamin Kramer | 875356a | 2013-07-19 17:49:21 +0000 | [diff] [blame] | 8 | // RUN: %clang -target s390x -### -S -emit-llvm -march=zEC12 %s 2>&1 | FileCheck --check-prefix=CHECK-ZEC12 %s |
Ulrich Weigand | 30354eb | 2016-10-31 14:38:05 +0000 | [diff] [blame] | 9 | // RUN: %clang -target s390x -### -S -emit-llvm -march=arch10 %s 2>&1 | FileCheck --check-prefix=CHECK-ARCH10 %s |
| 10 | // RUN: %clang -target s390x -### -S -emit-llvm -march=z13 %s 2>&1 | FileCheck --check-prefix=CHECK-Z13 %s |
| 11 | // RUN: %clang -target s390x -### -S -emit-llvm -march=arch11 %s 2>&1 | FileCheck --check-prefix=CHECK-ARCH11 %s |
Ulrich Weigand | cac24ab | 2017-07-17 17:45:57 +0000 | [diff] [blame] | 12 | // RUN: %clang -target s390x -### -S -emit-llvm -march=z14 %s 2>&1 | FileCheck --check-prefix=CHECK-Z14 %s |
| 13 | // RUN: %clang -target s390x -### -S -emit-llvm -march=arch12 %s 2>&1 | FileCheck --check-prefix=CHECK-ARCH12 %s |
Richard Sandiford | 4652d89 | 2013-07-19 16:51:51 +0000 | [diff] [blame] | 14 | |
| 15 | // CHECK-Z9: error: unknown target CPU 'z9' |
| 16 | // CHECK-Z10: "-target-cpu" "z10" |
Ulrich Weigand | 30354eb | 2016-10-31 14:38:05 +0000 | [diff] [blame] | 17 | // CHECK-ARCH8: "-target-cpu" "arch8" |
Richard Sandiford | 4652d89 | 2013-07-19 16:51:51 +0000 | [diff] [blame] | 18 | // CHECK-Z196: "-target-cpu" "z196" |
Ulrich Weigand | 30354eb | 2016-10-31 14:38:05 +0000 | [diff] [blame] | 19 | // CHECK-ARCH9: "-target-cpu" "arch9" |
Richard Sandiford | 4652d89 | 2013-07-19 16:51:51 +0000 | [diff] [blame] | 20 | // CHECK-ZEC12: "-target-cpu" "zEC12" |
Ulrich Weigand | 30354eb | 2016-10-31 14:38:05 +0000 | [diff] [blame] | 21 | // CHECK-ARCH10: "-target-cpu" "arch10" |
| 22 | // CHECK-Z13: "-target-cpu" "z13" |
| 23 | // CHECK-ARCH11: "-target-cpu" "arch11" |
Ulrich Weigand | cac24ab | 2017-07-17 17:45:57 +0000 | [diff] [blame] | 24 | // CHECK-Z14: "-target-cpu" "z14" |
| 25 | // CHECK-ARCH12: "-target-cpu" "arch12" |
Richard Sandiford | 4652d89 | 2013-07-19 16:51:51 +0000 | [diff] [blame] | 26 | |
| 27 | int x; |