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 // RUN: not %clang -target powerpc64le-unknown-unknown -fsyntax-only \ 93 // RUN: -std=c++11 -msoft-float -mpower8-vector %s 2>&1 | \ 94 // RUN: FileCheck %s -check-prefix=CHECK-SOFTFLT-P8VEC 95 96 // RUN: not %clang -target powerpc64le-unknown-unknown -fsyntax-only \ 97 // RUN: -std=c++11 -msoft-float -mpower9-vector %s 2>&1 | \ 98 // RUN: FileCheck %s -check-prefix=CHECK-SOFTFLT-P9VEC 99 100 // RUN: not %clang -target powerpc64le-unknown-unknown -fsyntax-only \ 101 // RUN: -std=c++11 -msoft-float -mpower10-vector %s 2>&1 | \ 102 // RUN: FileCheck %s -check-prefix=CHECK-SOFTFLT-P10VEC 103 104 // RUN: not %clang -target powerpc64le-unknown-unknown -fsyntax-only \ 105 // RUN: -std=c++11 -msoft-float -mdirect-move %s 2>&1 | \ 106 // RUN: FileCheck %s -check-prefix=CHECK-SOFTFLT-DIRECTMOVE 107 108 // RUN: not %clang -target powerpc64le-unknown-unknown -fsyntax-only \ 109 // RUN: -std=c++11 -msoft-float -mmma %s 2>&1 | \ 110 // RUN: FileCheck %s -check-prefix=CHECK-SOFTFLT-MMA 111 112 // RUN: not %clang -target powerpc64le-unknown-unknown -fsyntax-only \ 113 // RUN: -std=c++11 -msoft-float -mpaired-vector-memops %s 2>&1 | \ 114 // RUN: FileCheck %s -check-prefix=CHECK-SOFTFLT-PAIREDVECMEMOP 115 116 // RUN: not %clang -target powerpc64le-unknown-unknown -fsyntax-only \ 117 // RUN: -std=c++11 -msoft-float -mcrypto %s 2>&1 | \ 118 // RUN: FileCheck %s -check-prefix=CHECK-SOFTFLT-CRYPTO 119 120 #ifdef __VSX__ 121 static_assert(false, "VSX enabled"); 122 #endif 123 124 #ifdef __POWER8_VECTOR__ 125 static_assert(false, "P8V enabled"); 126 #endif 127 128 #ifdef __POWER9_VECTOR__ 129 static_assert(false, "P9V enabled"); 130 #endif 131 132 #ifdef __POWER10_VECTOR__ 133 static_assert(false, "P10V enabled"); 134 #endif 135 136 #if !defined(__VSX__) && !defined(__POWER8_VECTOR__) && \ 137 !defined(__POWER9_VECTOR__) 138 static_assert(false, "Neither enabled"); 139 #endif 140 141 // CHECK-DEFAULT: VSX enabled 142 // CHECK-DEFAULT: P8V enabled 143 // CHECK-DEFAULT-P9: P9V enabled 144 // CHECK-DEFAULT-P10: P10V enabled 145 // CHECK-NVSX-P8V: error: option '-mpower8-vector' cannot be specified with '-mno-vsx' 146 // CHECK-NVSX-P9V: error: option '-mpower9-vector' cannot be specified with '-mno-vsx' 147 // CHECK-NVSX-P10V: error: option '-mpower10-vector' cannot be specified with '-mno-vsx' 148 // CHECK-NVSX-FLT128: error: option '-mfloat128' cannot be specified with '-mno-vsx' 149 // CHECK-NVSX-DMV: error: option '-mdirect-move' cannot be specified with '-mno-vsx' 150 // CHECK-NVSX-PAIRED-VEC-MEMOPS: error: option '-mpaired-vector-memops' cannot be specified with '-mno-vsx' 151 // CHECK-NVSX-MULTI: error: option '-mfloat128' cannot be specified with '-mno-vsx' 152 // CHECK-NVSX-MULTI: error: option '-mpower9-vector' cannot be specified with '-mno-vsx' 153 // CHECK-NVSX-MMA: error: option '-mmma' cannot be specified with '-mno-vsx' 154 // CHECK-NVSX: Neither enabled 155 // CHECK-VSX: VSX enabled 156 // CHECK-NALTI-VSX: error: option '-mvsx' cannot be specified with '-mno-altivec' 157 // CHECK-SOFTFLT-ALTI: error: option '-maltivec' cannot be specified with '-msoft-float' 158 // CHECK-SOFTFLT-VSX: error: option '-mvsx' cannot be specified with '-msoft-float' 159 // CHECK-SOFTFLT-FLOAT128: error: option '-mfloat128' cannot be specified with '-msoft-float' 160 // CHECK-SOFTFLT-P8VEC: error: option '-mpower8-vector' cannot be specified with '-msoft-float' 161 // CHECK-SOFTFLT-P9VEC: error: option '-mpower9-vector' cannot be specified with '-msoft-float' 162 // CHECK-SOFTFLT-P10VEC: error: option '-mpower10-vector' cannot be specified with '-msoft-float' 163 // CHECK-SOFTFLT-DIRECTMOVE: error: option '-mdirect-move' cannot be specified with '-msoft-float' 164 // CHECK-SOFTFLT-MMA: error: option '-mmma' cannot be specified with '-msoft-float' 165 // CHECK-SOFTFLT-PAIREDVECMEMOP: error: option '-mpaired-vector-memops' cannot be specified with '-msoft-float' 166 // CHECK-SOFTFLT-CRYPTO: error: option '-mcrypto' cannot be specified with '-msoft-float' 167