| 1 |
// RUN: %clang --target=i386 -march=i386 -mx87 %s -### 2>&1 | FileCheck -check-prefix=X87 %s |
| 2 |
// RUN: %clang --target=i386 -march=i386 -mno-x87 %s -### 2>&1 | FileCheck -check-prefix=NO-X87 %s |
| 3 |
// RUN: %clang --target=i386 -march=i386 -m80387 %s -### 2>&1 | FileCheck -check-prefix=X87 %s |
| 4 |
// RUN: %clang --target=i386 -march=i386 -mno-80387 %s -### 2>&1 | FileCheck -check-prefix=NO-X87 %s |
| 5 |
// RUN: %clang --target=i386 -march=i386 -mno-fp-ret-in-387 %s -### 2>&1 | FileCheck -check-prefix=NO-X87 %s |
| 6 |
// X87: "-target-feature" "+x87" |
| 7 |
// NO-X87: "-target-feature" "-x87" |
| 8 |
|
| 9 |
// RUN: %clang --target=i386 -march=i386 -mmmx -m3dnow -m3dnowa %s -### 2>&1 | FileCheck -check-prefix=MMX %s |
| 10 |
// RUN: %clang --target=i386 -march=i386 -mno-mmx -mno-3dnow -mno-3dnowa %s -### 2>&1 | FileCheck -check-prefix=NO-MMX %s |
| 11 |
// MMX: warning: the clang compiler does not support '-m3dnowa' |
| 12 |
// MMX: warning: the clang compiler does not support '-m3dnow' |
| 13 |
// MMX-NOT: "3dnow" |
| 14 |
// MMX: "-target-feature" "+mmx" |
| 15 |
// MMX-NOT: "3dnow" |
| 16 |
// NO-MMX-NOT: warning |
| 17 |
// NO-MMX: "-target-feature" "-mmx" |
| 18 |
|
| 19 |
// RUN: %clang --target=i386 -march=i386 -msse -msse2 -msse3 -mssse3 -msse4a -msse4.1 -msse4.2 %s -### 2>&1 | FileCheck -check-prefix=SSE %s |
| 20 |
// RUN: %clang --target=i386 -march=i386 -mno-sse -mno-sse2 -mno-sse3 -mno-ssse3 -mno-sse4a -mno-sse4.1 -mno-sse4.2 %s -### 2>&1 | FileCheck -check-prefix=NO-SSE %s |
| 21 |
// SSE: "-target-feature" "+sse" "-target-feature" "+sse2" "-target-feature" "+sse3" "-target-feature" "+ssse3" "-target-feature" "+sse4a" "-target-feature" "+sse4.1" "-target-feature" "+sse4.2" |
| 22 |
// NO-SSE: "-target-feature" "-sse" "-target-feature" "-sse2" "-target-feature" "-sse3" "-target-feature" "-ssse3" "-target-feature" "-sse4a" "-target-feature" "-sse4.1" "-target-feature" "-sse4.2" |
| 23 |
|
| 24 |
// RUN: %clang --target=i386 -march=i386 -msse4 -maes %s -### 2>&1 | FileCheck -check-prefix=SSE4-AES %s |
| 25 |
// RUN: %clang --target=i386 -march=i386 -mno-sse4 -mno-aes %s -### 2>&1 | FileCheck -check-prefix=NO-SSE4-AES %s |
| 26 |
// SSE4-AES: "-target-feature" "+sse4.2" "-target-feature" "+aes" |
| 27 |
// NO-SSE4-AES: "-target-feature" "-sse4.1" "-target-feature" "-aes" |
| 28 |
|
| 29 |
// RUN: %clang --target=i386 -march=i386 -mavx -mavx2 -mavx512f -mavx512cd -mavx512dq -mavx512bw -mavx512vl -mavx512vbmi -mavx512vbmi2 -mavx512ifma %s -### 2>&1 | FileCheck -check-prefix=AVX %s |
| 30 |
// RUN: %clang --target=i386 -march=i386 -mno-avx -mno-avx2 -mno-avx512f -mno-avx512cd -mno-avx512dq -mno-avx512bw -mno-avx512vl -mno-avx512vbmi -mno-avx512vbmi2 -mno-avx512ifma %s -### 2>&1 | FileCheck -check-prefix=NO-AVX %s |
| 31 |
// AVX: "-target-feature" "+avx" "-target-feature" "+avx2" "-target-feature" "+avx512f" "-target-feature" "+avx512cd" "-target-feature" "+avx512dq" "-target-feature" "+avx512bw" "-target-feature" "+avx512vl" "-target-feature" "+avx512vbmi" "-target-feature" "+avx512vbmi2" "-target-feature" "+avx512ifma" |
| 32 |
// NO-AVX: "-target-feature" "-avx" "-target-feature" "-avx2" "-target-feature" "-avx512f" "-target-feature" "-avx512cd" "-target-feature" "-avx512dq" "-target-feature" "-avx512bw" "-target-feature" "-avx512vl" "-target-feature" "-avx512vbmi" "-target-feature" "-avx512vbmi2" "-target-feature" "-avx512ifma" |
| 33 |
|
| 34 |
// RUN: %clang --target=i386 -march=i386 -mpclmul -mrdrnd -mfsgsbase -mbmi -mbmi2 %s -### 2>&1 | FileCheck -check-prefix=BMI %s |
| 35 |
// RUN: %clang --target=i386 -march=i386 -mno-pclmul -mno-rdrnd -mno-fsgsbase -mno-bmi -mno-bmi2 %s -### 2>&1 | FileCheck -check-prefix=NO-BMI %s |
| 36 |
// BMI: "-target-feature" "+pclmul" "-target-feature" "+rdrnd" "-target-feature" "+fsgsbase" "-target-feature" "+bmi" "-target-feature" "+bmi2" |
| 37 |
// NO-BMI: "-target-feature" "-pclmul" "-target-feature" "-rdrnd" "-target-feature" "-fsgsbase" "-target-feature" "-bmi" "-target-feature" "-bmi2" |
| 38 |
|
| 39 |
// RUN: %clang --target=i386 -march=i386 -mlzcnt -mpopcnt -mtbm -mfma -mfma4 %s -### 2>&1 | FileCheck -check-prefix=FMA %s |
| 40 |
// RUN: %clang --target=i386 -march=i386 -mno-lzcnt -mno-popcnt -mno-tbm -mno-fma -mno-fma4 %s -### 2>&1 | FileCheck -check-prefix=NO-FMA %s |
| 41 |
// FMA: "-target-feature" "+lzcnt" "-target-feature" "+popcnt" "-target-feature" "+tbm" "-target-feature" "+fma" "-target-feature" "+fma4" |
| 42 |
// NO-FMA: "-target-feature" "-lzcnt" "-target-feature" "-popcnt" "-target-feature" "-tbm" "-target-feature" "-fma" "-target-feature" "-fma4" |
| 43 |
|
| 44 |
// RUN: %clang --target=i386 -march=i386 -mxop -mf16c -mrtm -mprfchw -mrdseed %s -### 2>&1 | FileCheck -check-prefix=XOP %s |
| 45 |
// RUN: %clang --target=i386 -march=i386 -mno-xop -mno-f16c -mno-rtm -mno-prfchw -mno-rdseed %s -### 2>&1 | FileCheck -check-prefix=NO-XOP %s |
| 46 |
// XOP: "-target-feature" "+xop" "-target-feature" "+f16c" "-target-feature" "+rtm" "-target-feature" "+prfchw" "-target-feature" "+rdseed" |
| 47 |
// NO-XOP: "-target-feature" "-xop" "-target-feature" "-f16c" "-target-feature" "-rtm" "-target-feature" "-prfchw" "-target-feature" "-rdseed" |
| 48 |
|
| 49 |
// RUN: %clang --target=i386 -march=i386 -msha -mpku -madx -mcx16 -mfxsr %s -### 2>&1 | FileCheck -check-prefix=SHA %s |
| 50 |
// RUN: %clang --target=i386 -march=i386 -mno-sha -mno-pku -mno-adx -mno-cx16 -mno-fxsr %s -### 2>&1 | FileCheck -check-prefix=NO-SHA %s |
| 51 |
// SHA: "-target-feature" "+sha" "-target-feature" "+pku" "-target-feature" "+adx" "-target-feature" "+cx16" "-target-feature" "+fxsr" |
| 52 |
// NO-SHA: "-target-feature" "-sha" "-target-feature" "-pku" "-target-feature" "-adx" "-target-feature" "-cx16" "-target-feature" "-fxsr" |
| 53 |
|
| 54 |
// RUN: %clang --target=i386 -march=i386 -mxsave -mxsaveopt -mxsavec -mxsaves %s -### 2>&1 | FileCheck -check-prefix=XSAVE %s |
| 55 |
// RUN: %clang --target=i386 -march=i386 -mno-xsave -mno-xsaveopt -mno-xsavec -mno-xsaves %s -### 2>&1 | FileCheck -check-prefix=NO-XSAVE %s |
| 56 |
// XSAVE: "-target-feature" "+xsave" "-target-feature" "+xsaveopt" "-target-feature" "+xsavec" "-target-feature" "+xsaves" |
| 57 |
// NO-XSAVE: "-target-feature" "-xsave" "-target-feature" "-xsaveopt" "-target-feature" "-xsavec" "-target-feature" "-xsaves" |
| 58 |
|
| 59 |
// RUN: %clang --target=i386 -march=i386 -mclflushopt %s -### 2>&1 | FileCheck -check-prefix=CLFLUSHOPT %s |
| 60 |
// RUN: %clang --target=i386 -march=i386 -mno-clflushopt %s -### 2>&1 | FileCheck -check-prefix=NO-CLFLUSHOPT %s |
| 61 |
// CLFLUSHOPT: "-target-feature" "+clflushopt" |
| 62 |
// NO-CLFLUSHOPT: "-target-feature" "-clflushopt" |
| 63 |
|
| 64 |
// RUN: %clang --target=i386 -march=i386 -mclwb %s -### 2>&1 | FileCheck -check-prefix=CLWB %s |
| 65 |
// RUN: %clang --target=i386 -march=i386 -mno-clwb %s -### 2>&1 | FileCheck -check-prefix=NO-CLWB %s |
| 66 |
// CLWB: "-target-feature" "+clwb" |
| 67 |
// NO-CLWB: "-target-feature" "-clwb" |
| 68 |
|
| 69 |
// RUN: %clang --target=i386 -march=i386 -mwbnoinvd %s -### 2>&1 | FileCheck -check-prefix=WBNOINVD %s |
| 70 |
// RUN: %clang --target=i386 -march=i386 -mno-wbnoinvd %s -### 2>&1 | FileCheck -check-prefix=NO-WBNOINVD %s |
| 71 |
// WBNOINVD: "-target-feature" "+wbnoinvd" |
| 72 |
// NO-WBNOINVD: "-target-feature" "-wbnoinvd" |
| 73 |
|
| 74 |
// RUN: %clang --target=i386 -march=i386 -mmovbe %s -### 2>&1 | FileCheck -check-prefix=MOVBE %s |
| 75 |
// RUN: %clang --target=i386 -march=i386 -mno-movbe %s -### 2>&1 | FileCheck -check-prefix=NO-MOVBE %s |
| 76 |
// MOVBE: "-target-feature" "+movbe" |
| 77 |
// NO-MOVBE: "-target-feature" "-movbe" |
| 78 |
|
| 79 |
// RUN: %clang --target=i386 -march=i386 -mmpx %s -### 2>&1 | FileCheck -check-prefix=MPX %s |
| 80 |
// RUN: %clang --target=i386 -march=i386 -mno-mpx %s -### 2>&1 | FileCheck -check-prefix=NO-MPX %s |
| 81 |
// MPX: the flag '-mmpx' has been deprecated and will be ignored |
| 82 |
// NO-MPX: the flag '-mno-mpx' has been deprecated and will be ignored |
| 83 |
|
| 84 |
// RUN: %clang --target=i386 -march=i386 -mshstk %s -### 2>&1 | FileCheck -check-prefix=CETSS %s |
| 85 |
// RUN: %clang --target=i386 -march=i386 -mno-shstk %s -### 2>&1 | FileCheck -check-prefix=NO-CETSS %s |
| 86 |
// CETSS: "-target-feature" "+shstk" |
| 87 |
// NO-CETSS: "-target-feature" "-shstk" |
| 88 |
|
| 89 |
// RUN: %clang --target=i386 -march=i386 -msgx %s -### 2>&1 | FileCheck -check-prefix=SGX %s |
| 90 |
// RUN: %clang --target=i386 -march=i386 -mno-sgx %s -### 2>&1 | FileCheck -check-prefix=NO-SGX %s |
| 91 |
// SGX: "-target-feature" "+sgx" |
| 92 |
// NO-SGX: "-target-feature" "-sgx" |
| 93 |
|
| 94 |
// RUN: %clang --target=i386 -march=i386 -mprefetchi %s -### -o %t.o 2>&1 | FileCheck -check-prefix=PREFETCHI %s |
| 95 |
// RUN: %clang --target=i386 -march=i386 -mno-prefetchi %s -### -o %t.o 2>&1 | FileCheck -check-prefix=NO-PREFETCHI %s |
| 96 |
// PREFETCHI: "-target-feature" "+prefetchi" |
| 97 |
// NO-PREFETCHI: "-target-feature" "-prefetchi" |
| 98 |
|
| 99 |
// RUN: %clang --target=i386 -march=i386 -mclzero %s -### 2>&1 | FileCheck -check-prefix=CLZERO %s |
| 100 |
// RUN: %clang --target=i386 -march=i386 -mno-clzero %s -### 2>&1 | FileCheck -check-prefix=NO-CLZERO %s |
| 101 |
// CLZERO: "-target-feature" "+clzero" |
| 102 |
// NO-CLZERO: "-target-feature" "-clzero" |
| 103 |
|
| 104 |
// RUN: %clang --target=i386 -march=i386 -mvaes %s -### 2>&1 | FileCheck -check-prefix=VAES %s |
| 105 |
// RUN: %clang --target=i386 -march=i386 -mno-vaes %s -### 2>&1 | FileCheck -check-prefix=NO-VAES %s |
| 106 |
// VAES: "-target-feature" "+vaes" |
| 107 |
// NO-VAES: "-target-feature" "-vaes" |
| 108 |
|
| 109 |
// RUN: %clang --target=i386 -march=i386 -mgfni %s -### 2>&1 | FileCheck -check-prefix=GFNI %s |
| 110 |
// RUN: %clang --target=i386 -march=i386 -mno-gfni %s -### 2>&1 | FileCheck -check-prefix=NO-GFNI %s |
| 111 |
// GFNI: "-target-feature" "+gfni" |
| 112 |
// NO-GFNI: "-target-feature" "-gfni |
| 113 |
|
| 114 |
// RUN: %clang --target=i386 -march=i386 -mvpclmulqdq %s -### 2>&1 | FileCheck -check-prefix=VPCLMULQDQ %s |
| 115 |
// RUN: %clang --target=i386 -march=i386 -mno-vpclmulqdq %s -### 2>&1 | FileCheck -check-prefix=NO-VPCLMULQDQ %s |
| 116 |
// VPCLMULQDQ: "-target-feature" "+vpclmulqdq" |
| 117 |
// NO-VPCLMULQDQ: "-target-feature" "-vpclmulqdq" |
| 118 |
|
| 119 |
// RUN: %clang --target=i386 -march=i386 -mavx512bitalg %s -### 2>&1 | FileCheck -check-prefix=BITALG %s |
| 120 |
// RUN: %clang --target=i386 -march=i386 -mno-avx512bitalg %s -### 2>&1 | FileCheck -check-prefix=NO-BITALG %s |
| 121 |
// BITALG: "-target-feature" "+avx512bitalg" |
| 122 |
// NO-BITALG: "-target-feature" "-avx512bitalg" |
| 123 |
|
| 124 |
// RUN: %clang --target=i386 -march=i386 -mavx512vnni %s -### 2>&1 | FileCheck -check-prefix=VNNI %s |
| 125 |
// RUN: %clang --target=i386 -march=i386 -mno-avx512vnni %s -### 2>&1 | FileCheck -check-prefix=NO-VNNI %s |
| 126 |
// VNNI: "-target-feature" "+avx512vnni" |
| 127 |
// NO-VNNI: "-target-feature" "-avx512vnni" |
| 128 |
|
| 129 |
// RUN: %clang --target=i386 -march=i386 -mavx512vbmi2 %s -### 2>&1 | FileCheck -check-prefix=VBMI2 %s |
| 130 |
// RUN: %clang --target=i386 -march=i386 -mno-avx512vbmi2 %s -### 2>&1 | FileCheck -check-prefix=NO-VBMI2 %s |
| 131 |
// VBMI2: "-target-feature" "+avx512vbmi2" |
| 132 |
// NO-VBMI2: "-target-feature" "-avx512vbmi2" |
| 133 |
|
| 134 |
// RUN: %clang --target=i386-linux-gnu -mavx512vp2intersect %s -### 2>&1 | FileCheck -check-prefix=VP2INTERSECT %s |
| 135 |
// RUN: %clang --target=i386-linux-gnu -mno-avx512vp2intersect %s -### 2>&1 | FileCheck -check-prefix=NO-VP2INTERSECT %s |
| 136 |
// VP2INTERSECT: "-target-feature" "+avx512vp2intersect" |
| 137 |
// NO-VP2INTERSECT: "-target-feature" "-avx512vp2intersect" |
| 138 |
|
| 139 |
// RUN: %clang --target=i386 -march=i386 -mrdpid %s -### 2>&1 | FileCheck -check-prefix=RDPID %s |
| 140 |
// RUN: %clang --target=i386 -march=i386 -mno-rdpid %s -### 2>&1 | FileCheck -check-prefix=NO-RDPID %s |
| 141 |
// RDPID: "-target-feature" "+rdpid" |
| 142 |
// NO-RDPID: "-target-feature" "-rdpid" |
| 143 |
|
| 144 |
// RUN: %clang --target=i386 -march=i386 -mrdpru %s -### 2>&1 | FileCheck -check-prefix=RDPRU %s |
| 145 |
// RUN: %clang --target=i386 -march=i386 -mno-rdpru %s -### 2>&1 | FileCheck -check-prefix=NO-RDPRU %s |
| 146 |
// RDPRU: "-target-feature" "+rdpru" |
| 147 |
// NO-RDPRU: "-target-feature" "-rdpru" |
| 148 |
|
| 149 |
// RUN: %clang --target=i386-linux-gnu -mretpoline %s -### 2>&1 | FileCheck -check-prefix=RETPOLINE %s |
| 150 |
// RUN: %clang --target=i386-linux-gnu -mno-retpoline %s -### 2>&1 | FileCheck -check-prefix=NO-RETPOLINE %s |
| 151 |
// RETPOLINE: "-target-feature" "+retpoline-indirect-calls" "-target-feature" "+retpoline-indirect-branches" |
| 152 |
// NO-RETPOLINE-NOT: retpoline |
| 153 |
|
| 154 |
// RUN: %clang --target=i386-linux-gnu -mretpoline -mretpoline-external-thunk %s -### 2>&1 | FileCheck -check-prefix=RETPOLINE-EXTERNAL-THUNK %s |
| 155 |
// RUN: %clang --target=i386-linux-gnu -mretpoline -mno-retpoline-external-thunk %s -### 2>&1 | FileCheck -check-prefix=NO-RETPOLINE-EXTERNAL-THUNK %s |
| 156 |
// RETPOLINE-EXTERNAL-THUNK: "-target-feature" "+retpoline-external-thunk" |
| 157 |
// NO-RETPOLINE-EXTERNAL-THUNK: "-target-feature" "-retpoline-external-thunk" |
| 158 |
|
| 159 |
// RUN: %clang --target=i386-linux-gnu -mspeculative-load-hardening %s -### 2>&1 | FileCheck -check-prefix=SLH %s |
| 160 |
// RUN: %clang --target=i386-linux-gnu -mretpoline -mspeculative-load-hardening %s -### 2>&1 | FileCheck -check-prefix=RETPOLINE %s |
| 161 |
// RUN: %clang --target=i386-linux-gnu -mno-speculative-load-hardening %s -### 2>&1 | FileCheck -check-prefix=NO-SLH %s |
| 162 |
// SLH-NOT: retpoline |
| 163 |
// SLH: "-target-feature" "+retpoline-indirect-calls" |
| 164 |
// SLH-NOT: retpoline |
| 165 |
// SLH: "-mspeculative-load-hardening" |
| 166 |
// NO-SLH-NOT: retpoline |
| 167 |
|
| 168 |
// RUN: %clang --target=i386-linux-gnu -mlvi-cfi %s -### 2>&1 | FileCheck -check-prefix=LVICFI %s |
| 169 |
// RUN: %clang --target=i386-linux-gnu -mno-lvi-cfi %s -### 2>&1 | FileCheck -check-prefix=NO-LVICFI %s |
| 170 |
// LVICFI: "-target-feature" "+lvi-cfi" |
| 171 |
// NO-LVICFI-NOT: lvi-cfi |
| 172 |
|
| 173 |
// RUN: not %clang --target=i386-linux-gnu -mlvi-cfi -mspeculative-load-hardening %s -### 2>&1 | FileCheck -check-prefix=LVICFI-SLH %s |
| 174 |
// LVICFI-SLH: error: invalid argument 'mspeculative-load-hardening' not allowed with 'mlvi-cfi' |
| 175 |
// RUN: not %clang --target=i386-linux-gnu -mlvi-cfi -mretpoline %s -### 2>&1 | FileCheck -check-prefix=LVICFI-RETPOLINE %s |
| 176 |
// LVICFI-RETPOLINE: error: invalid argument 'mretpoline' not allowed with 'mlvi-cfi' |
| 177 |
// RUN: not %clang --target=i386-linux-gnu -mlvi-cfi -mretpoline-external-thunk %s -### 2>&1 | FileCheck -check-prefix=LVICFI-RETPOLINE-EXTERNAL-THUNK %s |
| 178 |
// LVICFI-RETPOLINE-EXTERNAL-THUNK: error: invalid argument 'mretpoline-external-thunk' not allowed with 'mlvi-cfi' |
| 179 |
|
| 180 |
// RUN: %clang --target=i386-linux-gnu -mlvi-hardening %s -### 2>&1 | FileCheck -check-prefix=LVIHARDENING %s |
| 181 |
// RUN: %clang --target=i386-linux-gnu -mno-lvi-hardening %s -### 2>&1 | FileCheck -check-prefix=NO-LVIHARDENING %s |
| 182 |
// LVIHARDENING: "-target-feature" "+lvi-load-hardening" "-target-feature" "+lvi-cfi" |
| 183 |
// NO-LVIHARDENING-NOT: "+lvi- |
| 184 |
|
| 185 |
// RUN: not %clang --target=i386-linux-gnu -mlvi-hardening -mspeculative-load-hardening %s -### 2>&1 | FileCheck -check-prefix=LVIHARDENING-SLH %s |
| 186 |
// LVIHARDENING-SLH: error: invalid argument 'mspeculative-load-hardening' not allowed with 'mlvi-hardening' |
| 187 |
// RUN: not %clang --target=i386-linux-gnu -mlvi-hardening -mretpoline %s -### 2>&1 | FileCheck -check-prefix=LVIHARDENING-RETPOLINE %s |
| 188 |
// LVIHARDENING-RETPOLINE: error: invalid argument 'mretpoline' not allowed with 'mlvi-hardening' |
| 189 |
// RUN: not %clang --target=i386-linux-gnu -mlvi-hardening -mretpoline-external-thunk %s -### 2>&1 | FileCheck -check-prefix=LVIHARDENING-RETPOLINE-EXTERNAL-THUNK %s |
| 190 |
// LVIHARDENING-RETPOLINE-EXTERNAL-THUNK: error: invalid argument 'mretpoline-external-thunk' not allowed with 'mlvi-hardening' |
| 191 |
|
| 192 |
// RUN: %clang --target=i386-linux-gnu -mseses %s -### 2>&1 | FileCheck -check-prefix=SESES %s |
| 193 |
// RUN: %clang --target=i386-linux-gnu -mno-seses %s -### 2>&1 | FileCheck -check-prefix=NO-SESES %s |
| 194 |
// SESES: "-target-feature" "+seses" |
| 195 |
// SESES: "-target-feature" "+lvi-cfi" |
| 196 |
// NO-SESES-NOT: seses |
| 197 |
// NO-SESES-NOT: lvi-cfi |
| 198 |
|
| 199 |
// RUN: %clang --target=i386-linux-gnu -mseses -mno-lvi-cfi %s -### 2>&1 | FileCheck -check-prefix=SESES-NOLVICFI %s |
| 200 |
// SESES-NOLVICFI: "-target-feature" "+seses" |
| 201 |
// SESES-NOLVICFI-NOT: lvi-cfi |
| 202 |
|
| 203 |
// RUN: not %clang --target=i386-linux-gnu -mseses -mspeculative-load-hardening %s -### 2>&1 | FileCheck -check-prefix=SESES-SLH %s |
| 204 |
// SESES-SLH: error: invalid argument 'mspeculative-load-hardening' not allowed with 'mseses' |
| 205 |
// RUN: not %clang --target=i386-linux-gnu -mseses -mretpoline %s -### 2>&1 | FileCheck -check-prefix=SESES-RETPOLINE %s |
| 206 |
// SESES-RETPOLINE: error: invalid argument 'mretpoline' not allowed with 'mseses' |
| 207 |
// RUN: not %clang --target=i386-linux-gnu -mseses -mretpoline-external-thunk %s -### 2>&1 | FileCheck -check-prefix=SESES-RETPOLINE-EXTERNAL-THUNK %s |
| 208 |
// SESES-RETPOLINE-EXTERNAL-THUNK: error: invalid argument 'mretpoline-external-thunk' not allowed with 'mseses' |
| 209 |
|
| 210 |
// RUN: not %clang --target=i386-linux-gnu -mseses -mlvi-hardening %s -### 2>&1 | FileCheck -check-prefix=SESES-LVIHARDENING %s |
| 211 |
// SESES-LVIHARDENING: error: invalid argument 'mlvi-hardening' not allowed with 'mseses' |
| 212 |
|
| 213 |
// RUN: %clang --target=i386-linux-gnu -mwaitpkg %s -### 2>&1 | FileCheck -check-prefix=WAITPKG %s |
| 214 |
// RUN: %clang --target=i386-linux-gnu -mno-waitpkg %s -### 2>&1 | FileCheck -check-prefix=NO-WAITPKG %s |
| 215 |
// WAITPKG: "-target-feature" "+waitpkg" |
| 216 |
// NO-WAITPKG: "-target-feature" "-waitpkg" |
| 217 |
|
| 218 |
// RUN: %clang --target=i386 -march=i386 -mmovdiri %s -### 2>&1 | FileCheck -check-prefix=MOVDIRI %s |
| 219 |
// RUN: %clang --target=i386 -march=i386 -mno-movdiri %s -### 2>&1 | FileCheck -check-prefix=NO-MOVDIRI %s |
| 220 |
// MOVDIRI: "-target-feature" "+movdiri" |
| 221 |
// NO-MOVDIRI: "-target-feature" "-movdiri" |
| 222 |
|
| 223 |
// RUN: %clang --target=i386 -march=i386 -mmovdir64b %s -### 2>&1 | FileCheck -check-prefix=MOVDIR64B %s |
| 224 |
// RUN: %clang --target=i386 -march=i386 -mno-movdir64b %s -### 2>&1 | FileCheck -check-prefix=NO-MOVDIR64B %s |
| 225 |
// MOVDIR64B: "-target-feature" "+movdir64b" |
| 226 |
// NO-MOVDIR64B: "-target-feature" "-movdir64b" |
| 227 |
|
| 228 |
// RUN: %clang --target=i386 -march=i386 -mpconfig %s -### 2>&1 | FileCheck -check-prefix=PCONFIG %s |
| 229 |
// RUN: %clang --target=i386 -march=i386 -mno-pconfig %s -### 2>&1 | FileCheck -check-prefix=NO-PCONFIG %s |
| 230 |
// PCONFIG: "-target-feature" "+pconfig" |
| 231 |
// NO-PCONFIG: "-target-feature" "-pconfig" |
| 232 |
|
| 233 |
// RUN: %clang --target=i386 -march=i386 -mptwrite %s -### 2>&1 | FileCheck -check-prefix=PTWRITE %s |
| 234 |
// RUN: %clang --target=i386 -march=i386 -mno-ptwrite %s -### 2>&1 | FileCheck -check-prefix=NO-PTWRITE %s |
| 235 |
// PTWRITE: "-target-feature" "+ptwrite" |
| 236 |
// NO-PTWRITE: "-target-feature" "-ptwrite" |
| 237 |
|
| 238 |
// RUN: %clang --target=i386 -march=i386 -minvpcid %s -### 2>&1 | FileCheck -check-prefix=INVPCID %s |
| 239 |
// RUN: %clang --target=i386 -march=i386 -mno-invpcid %s -### 2>&1 | FileCheck -check-prefix=NO-INVPCID %s |
| 240 |
// INVPCID: "-target-feature" "+invpcid" |
| 241 |
// NO-INVPCID: "-target-feature" "-invpcid" |
| 242 |
|
| 243 |
// RUN: %clang --target=i386 -march=i386 -mavx512bf16 %s -### 2>&1 | FileCheck -check-prefix=AVX512BF16 %s |
| 244 |
// RUN: %clang --target=i386 -march=i386 -mno-avx512bf16 %s -### 2>&1 | FileCheck -check-prefix=NO-AVX512BF16 %s |
| 245 |
// AVX512BF16: "-target-feature" "+avx512bf16" |
| 246 |
// NO-AVX512BF16: "-target-feature" "-avx512bf16" |
| 247 |
|
| 248 |
// RUN: %clang --target=i386 -march=i386 -menqcmd %s -### 2>&1 | FileCheck --check-prefix=ENQCMD %s |
| 249 |
// RUN: %clang --target=i386 -march=i386 -mno-enqcmd %s -### 2>&1 | FileCheck --check-prefix=NO-ENQCMD %s |
| 250 |
// ENQCMD: "-target-feature" "+enqcmd" |
| 251 |
// NO-ENQCMD: "-target-feature" "-enqcmd" |
| 252 |
|
| 253 |
// RUN: %clang --target=i386 -march=i386 -mvzeroupper %s -### 2>&1 | FileCheck --check-prefix=VZEROUPPER %s |
| 254 |
// RUN: %clang --target=i386 -march=i386 -mno-vzeroupper %s -### 2>&1 | FileCheck --check-prefix=NO-VZEROUPPER %s |
| 255 |
// VZEROUPPER: "-target-feature" "+vzeroupper" |
| 256 |
// NO-VZEROUPPER: "-target-feature" "-vzeroupper" |
| 257 |
|
| 258 |
// RUN: %clang --target=i386 -march=i386 -mserialize %s -### 2>&1 | FileCheck -check-prefix=SERIALIZE %s |
| 259 |
// RUN: %clang --target=i386 -march=i386 -mno-serialize %s -### 2>&1 | FileCheck -check-prefix=NO-SERIALIZE %s |
| 260 |
// SERIALIZE: "-target-feature" "+serialize" |
| 261 |
// NO-SERIALIZE: "-target-feature" "-serialize" |
| 262 |
|
| 263 |
// RUN: %clang --target=i386 -march=i386 -mtsxldtrk %s -### 2>&1 | FileCheck --check-prefix=TSXLDTRK %s |
| 264 |
// RUN: %clang --target=i386 -march=i386 -mno-tsxldtrk %s -### 2>&1 | FileCheck --check-prefix=NO-TSXLDTRK %s |
| 265 |
// TSXLDTRK: "-target-feature" "+tsxldtrk" |
| 266 |
// NO-TSXLDTRK: "-target-feature" "-tsxldtrk" |
| 267 |
|
| 268 |
// RUN: %clang --target=i386-linux-gnu -mkl %s -### 2>&1 | FileCheck -check-prefix=KL %s |
| 269 |
// RUN: %clang --target=i386-linux-gnu -mno-kl %s -### 2>&1 | FileCheck -check-prefix=NO-KL %s |
| 270 |
// KL: "-target-feature" "+kl" |
| 271 |
// NO-KL: "-target-feature" "-kl" |
| 272 |
|
| 273 |
// RUN: %clang --target=i386-linux-gnu -mwidekl %s -### 2>&1 | FileCheck -check-prefix=WIDE_KL %s |
| 274 |
// RUN: %clang --target=i386-linux-gnu -mno-widekl %s -### 2>&1 | FileCheck -check-prefix=NO-WIDE_KL %s |
| 275 |
// WIDE_KL: "-target-feature" "+widekl" |
| 276 |
// NO-WIDE_KL: "-target-feature" "-widekl" |
| 277 |
|
| 278 |
// RUN: %clang --target=i386 -march=i386 -mamx-tile %s -### 2>&1 | FileCheck --check-prefix=AMX-TILE %s |
| 279 |
// RUN: %clang --target=i386 -march=i386 -mno-amx-tile %s -### 2>&1 | FileCheck --check-prefix=NO-AMX-TILE %s |
| 280 |
// AMX-TILE: "-target-feature" "+amx-tile" |
| 281 |
// NO-AMX-TILE: "-target-feature" "-amx-tile" |
| 282 |
|
| 283 |
// RUN: %clang --target=i386 -march=i386 -mamx-bf16 %s -### 2>&1 | FileCheck --check-prefix=AMX-BF16 %s |
| 284 |
// RUN: %clang --target=i386 -march=i386 -mno-amx-bf16 %s -### 2>&1 | FileCheck -check-prefix=NO-AMX-BF16 %s |
| 285 |
// AMX-BF16: "-target-feature" "+amx-bf16" |
| 286 |
// NO-AMX-BF16: "-target-feature" "-amx-bf16" |
| 287 |
|
| 288 |
// RUN: %clang --target=i386 -march=i386 -mamx-int8 %s -### 2>&1 | FileCheck --check-prefix=AMX-INT8 %s |
| 289 |
// RUN: %clang --target=i386 -march=i386 -mno-amx-int8 %s -### 2>&1 | FileCheck --check-prefix=NO-AMX-INT8 %s |
| 290 |
// AMX-INT8: "-target-feature" "+amx-int8" |
| 291 |
// NO-AMX-INT8: "-target-feature" "-amx-int8" |
| 292 |
|
| 293 |
// RUN: %clang --target=x86_64 -mamx-fp16 %s \ |
| 294 |
// RUN: -### -o %t.o 2>&1 | FileCheck -check-prefix=AMX-FP16 %s |
| 295 |
// RUN: %clang --target=x86_64 -mno-amx-fp16 \ |
| 296 |
// RUN: %s -### -o %t.o 2>&1 | FileCheck -check-prefix=NO-AMX-FP16 %s |
| 297 |
// AMX-FP16: "-target-feature" "+amx-fp16" |
| 298 |
// NO-AMX-FP16: "-target-feature" "-amx-fp16" |
| 299 |
|
| 300 |
// RUN: %clang --target=x86_64-unknown-linux-gnu -mamx-complex %s \ |
| 301 |
// RUN: -### -o %t.o 2>&1 | FileCheck -check-prefix=AMX-COMPLEX %s |
| 302 |
// RUN: %clang --target=x86_64-unknown-linux-gnu -mno-amx-complex %s \ |
| 303 |
// RUN: -### -o %t.o 2>&1 | FileCheck -check-prefix=NO-AMX-COMPLEX %s |
| 304 |
// AMX-COMPLEX: "-target-feature" "+amx-complex" |
| 305 |
// NO-AMX-COMPLEX: "-target-feature" "-amx-complex" |
| 306 |
|
| 307 |
// RUN: %clang --target=x86_64-unknown-linux-gnu -mamx-avx512 %s \ |
| 308 |
// RUN: -### -o %t.o 2>&1 | FileCheck -check-prefix=AMX-AVX512 %s |
| 309 |
// RUN: %clang --target=x86_64-unknown-linux-gnu -mno-amx-avx512 %s \ |
| 310 |
// RUN: -### -o %t.o 2>&1 | FileCheck -check-prefix=NO-AMX-AVX512 %s |
| 311 |
// AMX-AVX512: "-target-feature" "+amx-avx512" |
| 312 |
// NO-AMX-AVX512: "-target-feature" "-amx-avx512" |
| 313 |
|
| 314 |
// RUN: %clang --target=x86_64-unknown-linux-gnu -mamx-tf32 %s \ |
| 315 |
// RUN: -### -o %t.o 2>&1 | FileCheck -check-prefix=AMX-TF32 %s |
| 316 |
// RUN: %clang --target=x86_64-unknown-linux-gnu -mno-amx-tf32 %s \ |
| 317 |
// RUN: -### -o %t.o 2>&1 | FileCheck -check-prefix=NO-AMX-TF32 %s |
| 318 |
// AMX-TF32: "-target-feature" "+amx-tf32" |
| 319 |
// NO-AMX-TF32: "-target-feature" "-amx-tf32" |
| 320 |
|
| 321 |
// RUN: %clang --target=i386 -march=i386 -mhreset %s -### 2>&1 | FileCheck -check-prefix=HRESET %s |
| 322 |
// RUN: %clang --target=i386 -march=i386 -mno-hreset %s -### 2>&1 | FileCheck -check-prefix=NO-HRESET %s |
| 323 |
// HRESET: "-target-feature" "+hreset" |
| 324 |
// NO-HRESET: "-target-feature" "-hreset" |
| 325 |
|
| 326 |
// RUN: %clang --target=x86_64 -muintr %s -### 2>&1 | FileCheck -check-prefix=UINTR %s |
| 327 |
// RUN: %clang --target=x86_64 -mno-uintr %s -### 2>&1 | FileCheck -check-prefix=NO-UINTR %s |
| 328 |
// UINTR: "-target-feature" "+uintr" |
| 329 |
// NO-UINTR: "-target-feature" "-uintr" |
| 330 |
|
| 331 |
// RUN: %clang --target=i386 -march=i386 -mavxvnni %s -### 2>&1 | FileCheck --check-prefix=AVX-VNNI %s |
| 332 |
// RUN: %clang --target=i386 -march=i386 -mno-avxvnni %s -### 2>&1 | FileCheck --check-prefix=NO-AVX-VNNI %s |
| 333 |
// AVX-VNNI: "-target-feature" "+avxvnni" |
| 334 |
// NO-AVX-VNNI: "-target-feature" "-avxvnni" |
| 335 |
|
| 336 |
// RUN: %clang --target=i386 -march=i386 -mavx512fp16 %s -### 2>&1 | FileCheck -check-prefix=AVX512FP16 %s |
| 337 |
// RUN: %clang --target=i386 -march=i386 -mno-avx512fp16 %s -### 2>&1 | FileCheck -check-prefix=NO-AVX512FP16 %s |
| 338 |
// AVX512FP16: "-target-feature" "+avx512fp16" |
| 339 |
// NO-AVX512FP16: "-target-feature" "-avx512fp16" |
| 340 |
|
| 341 |
// RUN: %clang --target=x86_64 -mcmpccxadd %s -### -o %t.o 2>&1 | FileCheck -check-prefix=CMPCCXADD %s |
| 342 |
// RUN: %clang --target=x86_64 -mno-cmpccxadd %s -### -o %t.o 2>&1 | FileCheck -check-prefix=NO-CMPCCXADD %s |
| 343 |
// CMPCCXADD: "-target-feature" "+cmpccxadd" |
| 344 |
// NO-CMPCCXADD: "-target-feature" "-cmpccxadd" |
| 345 |
|
| 346 |
// RUN: %clang --target=i386 -march=i386 -mraoint %s -### 2>&1 | FileCheck -check-prefix=RAOINT %s |
| 347 |
// RUN: %clang --target=i386 -march=i386 -mno-raoint %s -### 2>&1 | FileCheck -check-prefix=NO-RAOINT %s |
| 348 |
// RAOINT: "-target-feature" "+raoint" |
| 349 |
// NO-RAOINT: "-target-feature" "-raoint" |
| 350 |
|
| 351 |
// RUN: %clang --target=i386-linux-gnu -mavxifma %s -### -o %t.o 2>&1 | FileCheck -check-prefix=AVXIFMA %s |
| 352 |
// RUN: %clang --target=i386-linux-gnu -mno-avxifma %s -### -o %t.o 2>&1 | FileCheck -check-prefix=NO-AVXIFMA %s |
| 353 |
// AVXIFMA: "-target-feature" "+avxifma" |
| 354 |
// NO-AVXIFMA: "-target-feature" "-avxifma" |
| 355 |
|
| 356 |
// RUN: %clang --target=i386 -mavxvnniint8 %s -### -o %t.o 2>&1 | FileCheck -check-prefix=AVX-VNNIINT8 %s |
| 357 |
// RUN: %clang --target=i386 -mno-avxvnniint8 %s -### -o %t.o 2>&1 | FileCheck -check-prefix=NO-AVX-VNNIINT8 %s |
| 358 |
// AVX-VNNIINT8: "-target-feature" "+avxvnniint8" |
| 359 |
// NO-AVX-VNNIINT8: "-target-feature" "-avxvnniint8" |
| 360 |
|
| 361 |
// RUN: %clang --target=i386 -mavxneconvert %s -### -o %t.o 2>&1 | FileCheck -check-prefix=AVXNECONVERT %s |
| 362 |
// RUN: %clang --target=i386 -mno-avxneconvert %s -### -o %t.o 2>&1 | FileCheck -check-prefix=NO-AVXNECONVERT %s |
| 363 |
// AVXNECONVERT: "-target-feature" "+avxneconvert" |
| 364 |
// NO-AVXNECONVERT: "-target-feature" "-avxneconvert" |
| 365 |
|
| 366 |
// RUN: %clang --target=i386 -msha512 %s -### -o %t.o 2>&1 | FileCheck -check-prefix=SHA512 %s |
| 367 |
// RUN: %clang --target=i386 -mno-sha512 %s -### -o %t.o 2>&1 | FileCheck -check-prefix=NO-SHA512 %s |
| 368 |
// SHA512: "-target-feature" "+sha512" |
| 369 |
// NO-SHA512: "-target-feature" "-sha512" |
| 370 |
|
| 371 |
// RUN: %clang --target=i386 -msm3 %s -### -o %t.o 2>&1 | FileCheck -check-prefix=SM3 %s |
| 372 |
// RUN: %clang --target=i386 -mno-sm3 %s -### -o %t.o 2>&1 | FileCheck -check-prefix=NO-SM3 %s |
| 373 |
// SM3: "-target-feature" "+sm3" |
| 374 |
// NO-SM3: "-target-feature" "-sm3" |
| 375 |
|
| 376 |
// RUN: %clang --target=i386 -msm4 %s -### -o %t.o 2>&1 | FileCheck -check-prefix=SM4 %s |
| 377 |
// RUN: %clang --target=i386 -mno-sm4 %s -### -o %t.o 2>&1 | FileCheck -check-prefix=NO-SM4 %s |
| 378 |
// SM4: "-target-feature" "+sm4" |
| 379 |
// NO-SM4: "-target-feature" "-sm4" |
| 380 |
|
| 381 |
// RUN: %clang --target=i386 -mavxvnniint16 %s -### -o %t.o 2>&1 | FileCheck -check-prefix=AVXVNNIINT16 %s |
| 382 |
// RUN: %clang --target=i386 -mno-avxvnniint16 %s -### -o %t.o 2>&1 | FileCheck -check-prefix=NO-AVXVNNIINT16 %s |
| 383 |
// AVXVNNIINT16: "-target-feature" "+avxvnniint16" |
| 384 |
// NO-AVXVNNIINT16: "-target-feature" "-avxvnniint16" |
| 385 |
|
| 386 |
// RUN: %clang --target=i386 -mavx10.1 %s -### -o %t.o 2>&1 -Werror | FileCheck -check-prefix=AVX10_1 %s |
| 387 |
// RUN: %clang --target=i386 -mno-avx10.1 %s -### -o %t.o 2>&1 -Werror | FileCheck -check-prefix=NO-AVX10_1 %s |
| 388 |
// AVX10_1: "-target-feature" "+avx10.1" |
| 389 |
// NO-AVX10_1: "-target-feature" "-avx10.1" |
| 390 |
|
| 391 |
// RUN: %clang --target=i386 -mavx10.2 %s -### -o %t.o 2>&1 -Werror | FileCheck -check-prefix=AVX10_2 %s |
| 392 |
// RUN: %clang --target=i386 -mno-avx10.2 %s -### -o %t.o 2>&1 -Werror | FileCheck -check-prefix=NO-AVX10_2 %s |
| 393 |
// AVX10_2: "-target-feature" "+avx10.2" |
| 394 |
// NO-AVX10_2: "-target-feature" "-avx10.2" |
| 395 |
|
| 396 |
// RUN: %clang --target=i386 -musermsr %s -### -o %t.o 2>&1 | FileCheck -check-prefix=USERMSR %s |
| 397 |
// RUN: %clang --target=i386 -mno-usermsr %s -### -o %t.o 2>&1 | FileCheck -check-prefix=NO-USERMSR %s |
| 398 |
// USERMSR: "-target-feature" "+usermsr" |
| 399 |
// NO-USERMSR: "-target-feature" "-usermsr" |
| 400 |
|
| 401 |
// RUN: %clang --target=i386 -mmovrs %s -### -o %t.o 2>&1 | FileCheck -check-prefix=MOVRS %s |
| 402 |
// RUN: %clang --target=i386 -mno-movrs %s -### -o %t.o 2>&1 | FileCheck -check-prefix=NO-MOVRS %s |
| 403 |
// MOVRS: "-target-feature" "+movrs" |
| 404 |
// NO-MOVRS: "-target-feature" "-movrs" |
| 405 |
|
| 406 |
// RUN: %clang --target=i386 -march=i386 -mcrc32 %s -### 2>&1 | FileCheck -check-prefix=CRC32 %s |
| 407 |
// RUN: %clang --target=i386 -march=i386 -mno-crc32 %s -### 2>&1 | FileCheck -check-prefix=NO-CRC32 %s |
| 408 |
// CRC32: "-target-feature" "+crc32" |
| 409 |
// NO-CRC32: "-target-feature" "-crc32" |
| 410 |
|
| 411 |
// RUN: not %clang -### --target=aarch64 -mcrc32 -msse4.1 -msse4.2 -mno-sgx %s 2>&1 | FileCheck --check-prefix=NONX86 %s |
| 412 |
// NONX86: error: unsupported option '-mcrc32' for target 'aarch64' |
| 413 |
// NONX86-NEXT: error: unsupported option '-msse4.1' for target 'aarch64' |
| 414 |
/// TODO: This warning is a workaround for https://github.com/llvm/llvm-project/issues/63270 |
| 415 |
// NONX86-NEXT: warning: argument unused during compilation: '-msse4.2' [-Wunused-command-line-argument] |
| 416 |
// NONX86-NEXT: error: unsupported option '-mno-sgx' for target 'aarch64' |
| 417 |
|
| 418 |
// RUN: not %clang -### --target=i386 -muintr %s 2>&1 | FileCheck --check-prefix=NON-UINTR %s |
| 419 |
// RUN: %clang -### --target=i386 -mno-uintr %s 2>&1 > /dev/null |
| 420 |
// RUN: not %clang -### --target=i386 -mapx-features=ndd %s 2>&1 | FileCheck --check-prefixes=NON-APX,NON-APXFS %s |
| 421 |
// RUN: not %clang -### --target=i386 -mapxf %s 2>&1 | FileCheck --check-prefixes=NON-APX,NON-APXF %s |
| 422 |
// RUN: %clang -### --target=i386 -mno-apxf %s 2>&1 > /dev/null |
| 423 |
// NON-UINTR: error: unsupported option '-muintr' for target 'i386' |
| 424 |
// NON-APXF: error: unsupported option '-mapxf' for target 'i386' |
| 425 |
// NON-APXFS: error: unsupported option '-mapx-features=' for target 'i386' |
| 426 |
// NON-APX-NOT: error: {{.*}} -mapx-features= |
| 427 |
|
| 428 |
// RUN: %clang --target=i386 -march=i386 -mharden-sls=return %s -### -o %t.o 2>&1 | FileCheck -check-prefixes=SLS-RET,NO-SLS %s |
| 429 |
// RUN: %clang --target=i386 -march=i386 -mharden-sls=indirect-jmp %s -### -o %t.o 2>&1 | FileCheck -check-prefixes=SLS-IJMP,NO-SLS %s |
| 430 |
// RUN: %clang --target=i386 -march=i386 -mharden-sls=none -mharden-sls=all %s -### -o %t.o 2>&1 | FileCheck -check-prefixes=SLS-IJMP,SLS-RET %s |
| 431 |
// RUN: %clang --target=i386 -march=i386 -mharden-sls=all -mharden-sls=none %s -### -o %t.o 2>&1 | FileCheck -check-prefix=NO-SLS %s |
| 432 |
// RUN: not %clang --target=i386 -march=i386 -mharden-sls=return,indirect-jmp %s -### -o %t.o 2>&1 | FileCheck -check-prefix=BAD-SLS %s |
| 433 |
// NO-SLS-NOT: "+harden-sls- |
| 434 |
// SLS-RET-DAG: "-target-feature" "+harden-sls-ret" |
| 435 |
// SLS-IJMP-DAG: "-target-feature" "+harden-sls-ijmp" |
| 436 |
// NO-SLS-NOT: "+harden-sls- |
| 437 |
// BAD-SLS: unsupported argument '{{[^']+}}' to option '-mharden-sls=' |
| 438 |
|
| 439 |
// RUN: touch %t.o |
| 440 |
// RUN: %clang -fdriver-only -Werror --target=x86_64-pc-linux-gnu -mharden-sls=all %t.o -o /dev/null 2>&1 | count 0 |
| 441 |
|
| 442 |
// RUN: %clang --target=x86_64-unknown-linux-gnu -mapxf %s -### -o %t.o 2>&1 | FileCheck -check-prefix=APXF %s |
| 443 |
// RUN: %clang --target=x86_64-unknown-linux-gnu -mno-apxf %s -### -o %t.o 2>&1 | FileCheck -check-prefix=NO-APXF %s |
| 444 |
// RUN: %clang --target=x86_64-unknown-linux-gnu -mno-apxf -mapxf %s -### -o %t.o 2>&1 | FileCheck -check-prefix=APXF %s |
| 445 |
// RUN: %clang --target=x86_64-unknown-linux-gnu -mapxf -mno-apxf %s -### -o %t.o 2>&1 | FileCheck -check-prefix=NO-APXF %s |
| 446 |
// |
| 447 |
// APXF: "-target-feature" "+egpr" "-target-feature" "+ndd" "-target-feature" "+ccmp" "-target-feature" "+nf" "-target-feature" "+zu" "-target-feature" "+push2pop2" "-target-feature" "+ppx" |
| 448 |
// NO-APXF: "-target-feature" "-egpr" "-target-feature" "-ndd" "-target-feature" "-ccmp" "-target-feature" "-nf" "-target-feature" "-zu" "-target-feature" "-push2pop2" "-target-feature" "-ppx" |
| 449 |
|
| 450 |
// RUN: %clang --target=x86_64-unknown-linux-gnu -mapx-features=egpr %s -### -o %t.o 2>&1 | FileCheck -check-prefix=EGPR %s |
| 451 |
// RUN: %clang --target=x86_64-unknown-linux-gnu -mapx-features=push2pop2 %s -### -o %t.o 2>&1 | FileCheck -check-prefix=PUSH2POP2 %s |
| 452 |
// RUN: %clang --target=x86_64-unknown-linux-gnu -mapx-features=ppx %s -### -o %t.o 2>&1 | FileCheck -check-prefix=PPX %s |
| 453 |
// RUN: %clang --target=x86_64-unknown-linux-gnu -mapx-features=ndd %s -### -o %t.o 2>&1 | FileCheck -check-prefix=NDD %s |
| 454 |
// RUN: %clang --target=x86_64-unknown-linux-gnu -mapx-features=ccmp %s -### -o %t.o 2>&1 | FileCheck -check-prefix=CCMP %s |
| 455 |
// RUN: %clang --target=x86_64-unknown-linux-gnu -mapx-features=nf %s -### -o %t.o 2>&1 | FileCheck -check-prefix=NF %s |
| 456 |
// RUN: %clang --target=x86_64-unknown-linux-gnu -mapx-features=cf %s -### -o %t.o 2>&1 | FileCheck -check-prefix=CF %s |
| 457 |
// RUN: %clang --target=x86_64-unknown-linux-gnu -mapx-features=zu %s -### -o %t.o 2>&1 | FileCheck -check-prefix=ZU %s |
| 458 |
// EGPR: "-target-feature" "+egpr" |
| 459 |
// PUSH2POP2: "-target-feature" "+push2pop2" |
| 460 |
// PPX: "-target-feature" "+ppx" |
| 461 |
// NDD: "-target-feature" "+ndd" |
| 462 |
// CCMP: "-target-feature" "+ccmp" |
| 463 |
// NF: "-target-feature" "+nf" |
| 464 |
// CF: "-target-feature" "+cf" |
| 465 |
// ZU: "-target-feature" "+zu" |
| 466 |
|
| 467 |
// RUN: %clang --target=x86_64-unknown-linux-gnu -mapx-features=egpr,ndd %s -### -o %t.o 2>&1 | FileCheck -check-prefix=EGPR-NDD %s |
| 468 |
// RUN: %clang --target=x86_64-unknown-linux-gnu -mapx-features=egpr -mapx-features=ndd %s -### -o %t.o 2>&1 | FileCheck -check-prefix=EGPR-NDD %s |
| 469 |
// RUN: %clang --target=x86_64-unknown-linux-gnu -mno-apx-features=egpr -mno-apx-features=ndd %s -### -o %t.o 2>&1 | FileCheck -check-prefix=NO-EGPR-NO-NDD %s |
| 470 |
// RUN: %clang --target=x86_64-unknown-linux-gnu -mno-apx-features=egpr -mapx-features=egpr,ndd %s -### -o %t.o 2>&1 | FileCheck -check-prefix=EGPR-NDD %s |
| 471 |
// RUN: %clang --target=x86_64-unknown-linux-gnu -mno-apx-features=egpr,ndd -mapx-features=egpr %s -### -o %t.o 2>&1 | FileCheck -check-prefix=EGPR-NO-NDD %s |
| 472 |
// RUN: %clang --target=x86_64-unknown-linux-gnu -mapx-features=egpr,ndd -mno-apx-features=egpr %s -### -o %t.o 2>&1 | FileCheck -check-prefix=NO-EGPR-NDD %s |
| 473 |
// RUN: %clang --target=x86_64-unknown-linux-gnu -mapx-features=egpr -mno-apx-features=egpr,ndd %s -### -o %t.o 2>&1 | FileCheck -check-prefix=NO-EGPR-NO-NDD %s |
| 474 |
// |
| 475 |
// EGPR-NDD: "-target-feature" "+egpr" "-target-feature" "+ndd" |
| 476 |
// EGPR-NO-NDD: "-target-feature" "-ndd" "-target-feature" "+egpr" |
| 477 |
// NO-EGPR-NDD: "-target-feature" "+ndd" "-target-feature" "-egpr" |
| 478 |
// NO-EGPR-NO-NDD: "-target-feature" "-egpr" "-target-feature" "-ndd" |
| 479 |
|
| 480 |
// RUN: not %clang --target=x86_64-unknown-linux-gnu -mapx-features=egpr,foo,bar %s -### -o %t.o 2>&1 | FileCheck -check-prefix=ERROR %s |
| 481 |
// |
| 482 |
// ERROR: unsupported argument 'foo' to option '-mapx-features=' |
| 483 |
// ERROR: unsupported argument 'bar' to option '-mapx-features=' |