| 1 |
// RUN: not %clang -target powerpc64le-unknown-unknown -fsyntax-only \ |
| 2 |
// RUN: -mcpu=power8 -std=c++11 %s 2>&1 | FileCheck %s \ |
| 3 |
// RUN: -check-prefix=CHECK-DEFAULT |
| 4 |
|
| 5 |
// RUN: not %clang -target powerpc64le-unknown-unknown -fsyntax-only \ |
| 6 |
// RUN: -mcpu=power8 -std=c++11 -mno-vsx -mpower8-vector %s 2>&1 | \ |
| 7 |
// RUN: FileCheck %s -check-prefix=CHECK-NVSX-P8V |
| 8 |
|
| 9 |
// RUN: not %clang -target powerpc64le-unknown-unknown -fsyntax-only \ |
| 10 |
// RUN: -mcpu=power8 -std=c++11 -mno-vsx -mdirect-move %s 2>&1 | FileCheck %s \ |
| 11 |
// RUN: -check-prefix=CHECK-NVSX-DMV |
| 12 |
|
| 13 |
// RUN: not %clang -target powerpc64le-unknown-unknown -fsyntax-only \ |
| 14 |
// RUN: -mcpu=power8 -std=c++11 -mno-vsx -mpower8-vector -mvsx %s 2>&1 | \ |
| 15 |
// RUN: FileCheck %s -check-prefix=CHECK-DEFAULT |
| 16 |
|
| 17 |
// RUN: not %clang -target powerpc64le-unknown-unknown -fsyntax-only \ |
| 18 |
// RUN: -mcpu=power8 -std=c++11 -mno-vsx -mdirect-move -mvsx %s 2>&1 | \ |
| 19 |
// RUN: FileCheck %s -check-prefix=CHECK-DEFAULT |
| 20 |
|
| 21 |
// RUN: not %clang -target powerpc64le-unknown-unknown -fsyntax-only \ |
| 22 |
// RUN: -mcpu=power8 -std=c++11 -mpower8-vector -mno-vsx %s 2>&1 | \ |
| 23 |
// RUN: FileCheck %s -check-prefix=CHECK-NVSX-P8V |
| 24 |
|
| 25 |
// RUN: not %clang -target powerpc64le-unknown-unknown -fsyntax-only \ |
| 26 |
// RUN: -mcpu=power8 -std=c++11 -mdirect-move -mno-vsx %s 2>&1 | FileCheck %s \ |
| 27 |
// RUN: -check-prefix=CHECK-NVSX-DMV |
| 28 |
|
| 29 |
// RUN: not %clang -target powerpc64le-unknown-unknown -fsyntax-only \ |
| 30 |
// RUN: -mcpu=power8 -std=c++11 -mno-vsx %s 2>&1 | FileCheck %s \ |
| 31 |
// RUN: -check-prefix=CHECK-NVSX |
| 32 |
|
| 33 |
// RUN: not %clang -target powerpc64le-unknown-unknown -fsyntax-only \ |
| 34 |
// RUN: -mcpu=power6 -std=c++11 %s 2>&1 | FileCheck %s -check-prefix=CHECK-NVSX |
| 35 |
|
| 36 |
// RUN: not %clang -target powerpc64le-unknown-unknown -fsyntax-only \ |
| 37 |
// RUN: -mcpu=power6 -std=c++11 -mpower8-vector %s 2>&1 | FileCheck %s \ |
| 38 |
// RUN: -check-prefix=CHECK-DEFAULT |
| 39 |
|
| 40 |
// RUN: not %clang -target powerpc64le-unknown-unknown -fsyntax-only \ |
| 41 |
// RUN: -mcpu=power6 -std=c++11 -mdirect-move %s 2>&1 | FileCheck %s \ |
| 42 |
// RUN: -check-prefix=CHECK-VSX |
| 43 |
|
| 44 |
// RUN: not %clang -target powerpc64le-unknown-unknown -fsyntax-only \ |
| 45 |
// RUN: -mcpu=power9 -std=c++11 %s 2>&1 | FileCheck %s \ |
| 46 |
// RUN: -check-prefix=CHECK-DEFAULT-P9 |
| 47 |
|
| 48 |
// RUN: not %clang -target powerpc64le-unknown-unknown -fsyntax-only \ |
| 49 |
// RUN: -mcpu=power9 -std=c++11 -mno-vsx -mpower9-vector %s 2>&1 | \ |
| 50 |
// RUN: FileCheck %s -check-prefix=CHECK-NVSX-P9V |
| 51 |
|
| 52 |
// RUN: not %clang -target powerpc64le-unknown-unknown -fsyntax-only \ |
| 53 |
// RUN: -mcpu=power9 -std=c++11 -mno-vsx -mfloat128 %s 2>&1 | \ |
| 54 |
// RUN: FileCheck %s -check-prefix=CHECK-NVSX-FLT128 |
| 55 |
|
| 56 |
// RUN: not %clang -target powerpc64le-unknown-unknown -fsyntax-only \ |
| 57 |
// RUN: -mcpu=power10 -std=c++11 -mno-vsx -mpaired-vector-memops %s 2>&1 | \ |
| 58 |
// RUN: FileCheck %s -check-prefix=CHECK-NVSX-PAIRED-VEC-MEMOPS |
| 59 |
|
| 60 |
// RUN: not %clang -target powerpc64le-unknown-unknown -fsyntax-only \ |
| 61 |
// RUN: -mcpu=power10 -std=c++11 -mno-vsx -mmma %s 2>&1 | \ |
| 62 |
// RUN: FileCheck %s -check-prefix=CHECK-NVSX-MMA |
| 63 |
|
| 64 |
// RUN: not %clang -target powerpc64le-unknown-unknown -fsyntax-only \ |
| 65 |
// RUN: -mcpu=future -std=c++11 -mno-vsx -mmma %s 2>&1 | \ |
| 66 |
// RUN: FileCheck %s -check-prefix=CHECK-NVSX-MMA |
| 67 |
|
| 68 |
// RUN: not %clang -target powerpc64le-unknown-unknown -fsyntax-only \ |
| 69 |
// RUN: -mcpu=power9 -std=c++11 -mno-vsx -mfloat128 -mpower9-vector %s 2>&1 | \ |
| 70 |
// RUN: FileCheck %s -check-prefix=CHECK-NVSX-MULTI |
| 71 |
|
| 72 |
// RUN: not %clang -target powerpc64le-unknown-unknown -fsyntax-only \ |
| 73 |
// RUN: -mcpu=power10 -std=c++11 %s 2>&1 | FileCheck %s \ |
| 74 |
// RUN: -check-prefix=CHECK-DEFAULT-P10 |
| 75 |
|
| 76 |
// RUN: not %clang -target powerpc64le-unknown-unknown -fsyntax-only \ |
| 77 |
// RUN: -mcpu=power10 -std=c++11 -mno-vsx -mpower10-vector %s 2>&1 | \ |
| 78 |
// RUN: FileCheck %s -check-prefix=CHECK-NVSX-P10V |
| 79 |
|
| 80 |
// RUN: not %clang -target powerpc64le-unknown-unknown -fsyntax-only \ |
| 81 |
// RUN: -std=c++11 -mvsx -mno-altivec %s 2>&1 | \ |
| 82 |
// RUN: FileCheck %s -check-prefix=CHECK-NALTI-VSX |
| 83 |
|
| 84 |
// RUN: not %clang -target powerpc64le-unknown-unknown -fsyntax-only \ |
| 85 |
// RUN: -std=c++11 -msoft-float -maltivec %s 2>&1 | \ |
| 86 |
// RUN: FileCheck %s -check-prefix=CHECK-SOFTFLT-ALTI |
| 87 |
|
| 88 |
// RUN: not %clang -target powerpc64le-unknown-unknown -fsyntax-only \ |
| 89 |
// RUN: -std=c++11 -msoft-float -mvsx %s 2>&1 | \ |
| 90 |
// RUN: FileCheck %s -check-prefix=CHECK-SOFTFLT-VSX |
| 91 |
|
| 92 |
#ifdef __VSX__ |
| 93 |
static_assert(false, "VSX enabled"); |
| 94 |
#endif |
| 95 |
|
| 96 |
#ifdef __POWER8_VECTOR__ |
| 97 |
static_assert(false, "P8V enabled"); |
| 98 |
#endif |
| 99 |
|
| 100 |
#ifdef __POWER9_VECTOR__ |
| 101 |
static_assert(false, "P9V enabled"); |
| 102 |
#endif |
| 103 |
|
| 104 |
#ifdef __POWER10_VECTOR__ |
| 105 |
static_assert(false, "P10V enabled"); |
| 106 |
#endif |
| 107 |
|
| 108 |
#if !defined(__VSX__) && !defined(__POWER8_VECTOR__) && \ |
| 109 |
!defined(__POWER9_VECTOR__) |
| 110 |
static_assert(false, "Neither enabled"); |
| 111 |
#endif |
| 112 |
|
| 113 |
// CHECK-DEFAULT: VSX enabled |
| 114 |
// CHECK-DEFAULT: P8V enabled |
| 115 |
// CHECK-DEFAULT-P9: P9V enabled |
| 116 |
// CHECK-DEFAULT-P10: P10V enabled |
| 117 |
// CHECK-NVSX-P8V: error: option '-mpower8-vector' cannot be specified with '-mno-vsx' |
| 118 |
// CHECK-NVSX-P9V: error: option '-mpower9-vector' cannot be specified with '-mno-vsx' |
| 119 |
// CHECK-NVSX-P10V: error: option '-mpower10-vector' cannot be specified with '-mno-vsx' |
| 120 |
// CHECK-NVSX-FLT128: error: option '-mfloat128' cannot be specified with '-mno-vsx' |
| 121 |
// CHECK-NVSX-DMV: error: option '-mdirect-move' cannot be specified with '-mno-vsx' |
| 122 |
// CHECK-NVSX-PAIRED-VEC-MEMOPS: error: option '-mpaired-vector-memops' cannot be specified with '-mno-vsx' |
| 123 |
// CHECK-NVSX-MULTI: error: option '-mfloat128' cannot be specified with '-mno-vsx' |
| 124 |
// CHECK-NVSX-MULTI: error: option '-mpower9-vector' cannot be specified with '-mno-vsx' |
| 125 |
// CHECK-NVSX-MMA: error: option '-mmma' cannot be specified with '-mno-vsx' |
| 126 |
// CHECK-NVSX: Neither enabled |
| 127 |
// CHECK-VSX: VSX enabled |
| 128 |
// CHECK-NALTI-VSX: error: option '-mvsx' cannot be specified with '-mno-altivec' |
| 129 |
// CHECK-SOFTFLT-ALTI: error: option '-msoft-float' cannot be specified with '-maltivec' |
| 130 |
// CHECK-SOFTFLT-VSX: error: option '-msoft-float' cannot be specified with '-mvsx' |