Chad Rosier | 1cdbfd3 | 2012-03-13 23:48:50 +0000 | [diff] [blame] | 1 | // Check that we error when -faltivec is specified on non-ppc platforms. |
Chad Rosier | 4574c3d | 2012-03-13 23:45:51 +0000 | [diff] [blame] | 2 | |
Rafael Espindola | 238b6a9 | 2012-10-09 20:46:28 +0000 | [diff] [blame] | 3 | // RUN: %clang -target powerpc-unk-unk -faltivec -fsyntax-only %s |
| 4 | // RUN: %clang -target powerpc64-linux-gnu -faltivec -fsyntax-only %s |
| 5 | // RUN: %clang -target powerpc64-linux-gnu -maltivec -fsyntax-only %s |
Chad Rosier | 4574c3d | 2012-03-13 23:45:51 +0000 | [diff] [blame] | 6 | |
Benjamin Kramer | 5aed86c | 2012-03-14 01:17:52 +0000 | [diff] [blame] | 7 | // RUN: %clang -target i386-pc-win32 -faltivec -fsyntax-only %s 2>&1 | FileCheck %s |
| 8 | // RUN: %clang -target x86_64-unknown-freebsd -faltivec -fsyntax-only %s 2>&1 | FileCheck %s |
| 9 | // RUN: %clang -target armv6-apple-darwin -faltivec -fsyntax-only %s 2>&1 | FileCheck %s |
| 10 | // RUN: %clang -target armv7-apple-darwin -faltivec -fsyntax-only %s 2>&1 | FileCheck %s |
Rafael Espindola | 238b6a9 | 2012-10-09 20:46:28 +0000 | [diff] [blame] | 11 | // RUN: %clang -target mips-linux-gnu -faltivec -fsyntax-only %s 2>&1 | FileCheck %s |
| 12 | // RUN: %clang -target mips64-linux-gnu -faltivec -fsyntax-only %s 2>&1 | FileCheck %s |
| 13 | // RUN: %clang -target sparc-unknown-solaris -faltivec -fsyntax-only %s 2>&1 | FileCheck %s |
Benjamin Kramer | 5aed86c | 2012-03-14 01:17:52 +0000 | [diff] [blame] | 14 | |
| 15 | // CHECK: invalid argument '-faltivec' only allowed with 'ppc/ppc64' |
Bill Schmidt | d123dc6 | 2013-02-01 14:45:29 +0000 | [diff] [blame] | 16 | |
| 17 | // Check that -fno-altivec and -mno-altivec correctly disable the altivec |
| 18 | // target feature on powerpc. |
| 19 | |
| 20 | // RUN: %clang -target powerpc64-unknown-linux-gnu %s -fno-altivec -### -o %t.o 2>&1 | FileCheck --check-prefix=CHECK-1 %s |
| 21 | // CHECK-1: "-target-feature" "-altivec" |
| 22 | |
| 23 | // RUN: %clang -target powerpc64-unknown-linux-gnu %s -mno-altivec -### -o %t.o 2>&1 | FileCheck --check-prefix=CHECK-2 %s |
| 24 | // CHECK-2: "-target-feature" "-altivec" |
| 25 | |
| 26 | // RUN: %clang -target powerpc64-unknown-linux-gnu %s -faltivec -mno-altivec -### -o %t.o 2>&1 | FileCheck --check-prefix=CHECK-3 %s |
| 27 | // CHECK-3: "-target-feature" "-altivec" |
| 28 | |
| 29 | // RUN: %clang -target powerpc64-unknown-linux-gnu %s -maltivec -fno-altivec -### -o %t.o 2>&1 | FileCheck --check-prefix=CHECK-4 %s |
| 30 | // CHECK-4: "-target-feature" "-altivec" |
| 31 | |
| 32 | // RUN: %clang -target powerpc64-unknown-linux-gnu %s -mno-altivec -faltivec -### -o %t.o 2>&1 | FileCheck --check-prefix=CHECK-5 %s |
| 33 | // CHECK-5-NOT: "-target-feature" "-altivec" |
| 34 | |
| 35 | // RUN: %clang -target powerpc64-unknown-linux-gnu %s -fno-altivec -maltivec -### -o %t.o 2>&1 | FileCheck --check-prefix=CHECK-6 %s |
| 36 | // CHECK-6-NOT: "-target-feature" "-altivec" |
| 37 | |
| 38 | // RUN: %clang -target powerpc64-unknown-linux-gnu %s -fno-altivec -mcpu=7400 -### -o %t.o 2>&1 | FileCheck --check-prefix=CHECK-7 %s |
| 39 | // CHECK-7: "-target-feature" "-altivec" |
| 40 | |
| 41 | // RUN: %clang -target powerpc64-unknown-linux-gnu %s -fno-altivec -mcpu=g4 -### -o %t.o 2>&1 | FileCheck --check-prefix=CHECK-8 %s |
| 42 | // CHECK-8: "-target-feature" "-altivec" |
| 43 | |
| 44 | // RUN: %clang -target powerpc64-unknown-linux-gnu %s -fno-altivec -mcpu=7450 -### -o %t.o 2>&1 | FileCheck --check-prefix=CHECK-9 %s |
| 45 | // CHECK-9: "-target-feature" "-altivec" |
| 46 | |
| 47 | // RUN: %clang -target powerpc64-unknown-linux-gnu %s -fno-altivec -mcpu=g4+ -### -o %t.o 2>&1 | FileCheck --check-prefix=CHECK-10 %s |
| 48 | // CHECK-10: "-target-feature" "-altivec" |
| 49 | |
| 50 | // RUN: %clang -target powerpc64-unknown-linux-gnu %s -fno-altivec -mcpu=970 -### -o %t.o 2>&1 | FileCheck --check-prefix=CHECK-11 %s |
| 51 | // CHECK-11: "-target-feature" "-altivec" |
| 52 | |
| 53 | // RUN: %clang -target powerpc64-unknown-linux-gnu %s -fno-altivec -mcpu=g5 -### -o %t.o 2>&1 | FileCheck --check-prefix=CHECK-12 %s |
| 54 | // CHECK-12: "-target-feature" "-altivec" |
| 55 | |
| 56 | // RUN: %clang -target powerpc64-unknown-linux-gnu %s -fno-altivec -mcpu=pwr6 -### -o %t.o 2>&1 | FileCheck --check-prefix=CHECK-13 %s |
| 57 | // CHECK-13: "-target-feature" "-altivec" |
| 58 | |
| 59 | // RUN: %clang -target powerpc64-unknown-linux-gnu %s -fno-altivec -mcpu=pwr7 -### -o %t.o 2>&1 | FileCheck --check-prefix=CHECK-14 %s |
| 60 | // CHECK-14: "-target-feature" "-altivec" |
| 61 | |
| 62 | // RUN: %clang -target powerpc64-unknown-linux-gnu %s -fno-altivec -mcpu=ppc64 -### -o %t.o 2>&1 | FileCheck --check-prefix=CHECK-15 %s |
| 63 | // CHECK-15: "-target-feature" "-altivec" |
| 64 | |
Hal Finkel | 3c6aaeb | 2013-02-01 18:44:19 +0000 | [diff] [blame] | 65 | // RUN: %clang -target powerpc64-unknown-linux-gnu %s -mno-qpx -### -o %t.o 2>&1 | FileCheck -check-prefix=CHECK-NOQPX %s |
| 66 | // CHECK-NOQPX: "-target-feature" "-qpx" |
| 67 | |
| 68 | // RUN: %clang -target powerpc64-unknown-linux-gnu %s -mno-qpx -mqpx -### -o %t.o 2>&1 | FileCheck -check-prefix=CHECK-QPX %s |
| 69 | // CHECK-QPX-NOT: "-target-feature" "-qpx" |
| 70 | |
Hal Finkel | f4320ab | 2013-03-28 08:38:53 +0000 | [diff] [blame] | 71 | // RUN: %clang -target powerpc64-unknown-linux-gnu %s -mno-mfcrf -### -o %t.o 2>&1 | FileCheck -check-prefix=CHECK-NOMFCRF %s |
| 72 | // CHECK-NOMFCRF: "-target-feature" "-mfocrf" |
| 73 | |
| 74 | // RUN: %clang -target powerpc64-unknown-linux-gnu %s -mno-mfcrf -mmfcrf -### -o %t.o 2>&1 | FileCheck -check-prefix=CHECK-MFCRF %s |
| 75 | // CHECK-MFCRF: "-target-feature" "+mfocrf" |
| 76 | |
Hal Finkel | 829d187 | 2013-03-28 13:51:36 +0000 | [diff] [blame] | 77 | // RUN: %clang -target powerpc64-unknown-linux-gnu %s -mno-popcntd -### -o %t.o 2>&1 | FileCheck -check-prefix=CHECK-NOPOPCNTD %s |
| 78 | // CHECK-NOPOPCNTD: "-target-feature" "-popcntd" |
| 79 | |
| 80 | // RUN: %clang -target powerpc64-unknown-linux-gnu %s -mno-popcntd -mpopcntd -### -o %t.o 2>&1 | FileCheck -check-prefix=CHECK-POPCNTD %s |
| 81 | // CHECK-POPCNTD: "-target-feature" "+popcntd" |
| 82 | |
Hal Finkel | fe6b271 | 2013-03-30 13:47:44 +0000 | [diff] [blame^] | 83 | // RUN: %clang -target powerpc64-unknown-linux-gnu %s -mno-fprnd -### -o %t.o 2>&1 | FileCheck -check-prefix=CHECK-NOFPRND %s |
| 84 | // CHECK-NOFPRND: "-target-feature" "-fprnd" |
| 85 | |
| 86 | // RUN: %clang -target powerpc64-unknown-linux-gnu %s -mno-fprnd -mfprnd -### -o %t.o 2>&1 | FileCheck -check-prefix=CHECK-FPRND %s |
| 87 | // CHECK-FPRND: "-target-feature" "+fprnd" |
| 88 | |