1 // Don't attempt slash switches on msys bash. 2 // REQUIRES: shell-preserves-root 3 // REQUIRES: x86-registered-target 4 5 // We support -m32 and -m64. We support all x86 CPU feature flags in gcc's -m 6 // flag space. 7 // RUN: %clang_cl /Zs /WX -m32 -m64 -msse3 -msse4.1 -mavx -mno-avx \ 8 // RUN: --target=i386-pc-win32 -### -- 2>&1 %s | FileCheck -check-prefix=MFLAGS %s 9 // MFLAGS-NOT: argument unused during compilation 10 11 // -arch:IA32 is no-op. 12 // RUN: %clang_cl -m32 -arch:IA32 --target=i386 -### -- 2>&1 %s | FileCheck -check-prefix=IA32 %s 13 // IA32-NOT: argument unused during compilation 14 // IA32-NOT: -target-feature 15 16 // RUN: %clang_cl -m32 -arch:ia32 --target=i386 -### -- 2>&1 %s | FileCheck -check-prefix=ia32 %s 17 // ia32: argument unused during compilation 18 // ia32-NOT: -target-feature 19 20 // RUN: %clang_cl -m64 -arch:IA32 --target=x86_64 -### -- 2>&1 %s | FileCheck -check-prefix=IA3264 %s 21 // IA3264: argument unused during compilation 22 // IA3264-NOT: -target-feature 23 24 // RUN: %clang_cl -m32 -arch:SSE --target=i386 -### -- 2>&1 %s | FileCheck -check-prefix=SSE %s 25 // SSE: -target-feature 26 // SSE: +sse 27 // SSE-NOT: argument unused during compilation 28 29 // RUN: %clang_cl -m32 -arch:sse --target=i386 -### -- 2>&1 %s | FileCheck -check-prefix=sse %s 30 // sse: argument unused during compilation 31 // sse-NOT: -target-feature 32 33 // RUN: %clang_cl -m32 -arch:SSE2 --target=i386 -### -- 2>&1 %s | FileCheck -check-prefix=SSE2 %s 34 // SSE2: -target-feature 35 // SSE2: +sse2 36 // SSE2-NOT: argument unused during compilation 37 38 // RUN: %clang_cl -m32 -arch:sse2 --target=i386 -### -- 2>&1 %s | FileCheck -check-prefix=sse %s 39 // sse2: argument unused during compilation 40 // sse2-NOT: -target-feature 41 42 // RUN: %clang_cl -m64 -arch:SSE --target=x86_64 -### -- 2>&1 %s | FileCheck -check-prefix=SSE64 %s 43 // SSE64: argument unused during compilation 44 // SSE64-NOT: -target-feature 45 46 // RUN: %clang_cl -m64 -arch:SSE2 --target=x86_64 -### -- 2>&1 %s | FileCheck -check-prefix=SSE264 %s 47 // SSE264: argument unused during compilation 48 // SSE264-NOT: -target-feature 49 50 // RUN: %clang_cl -m32 -arch:AVX --target=i386 -### -- 2>&1 %s | FileCheck -check-prefix=AVX %s 51 // AVX: -target-feature 52 // AVX: +avx 53 54 // RUN: %clang_cl -m32 -arch:avx --target=i386 -### -- 2>&1 %s | FileCheck -check-prefix=avx %s 55 // avx: argument unused during compilation 56 // avx-NOT: -target-feature 57 58 // RUN: %clang_cl -m32 -arch:AVX2 --target=i386 -### -- 2>&1 %s | FileCheck -check-prefix=AVX2 %s 59 // AVX2: -target-feature 60 // AVX2: +avx2 61 62 // RUN: %clang_cl -m32 -arch:avx2 --target=i386 -### -- 2>&1 %s | FileCheck -check-prefix=avx2 %s 63 // avx2: argument unused during compilation 64 // avx2-NOT: -target-feature 65 66 // RUN: %clang_cl -m64 -arch:AVX --target=x86_64 -### -- 2>&1 %s | FileCheck -check-prefix=AVX64 %s 67 // AVX64: -target-feature 68 // AVX64: +avx 69 70 // RUN: %clang_cl -m64 -arch:avx --target=x86_64 -### -- 2>&1 %s | FileCheck -check-prefix=avx64 %s 71 // avx64: argument unused during compilation 72 // avx64-NOT: -target-feature 73 74 // RUN: %clang_cl -m64 -arch:AVX2 --target=x86_64 -### -- 2>&1 %s | FileCheck -check-prefix=AVX264 %s 75 // AVX264: -target-feature 76 // AVX264: +avx2 77 78 // RUN: %clang_cl -m64 -arch:avx2 --target=x86_64 -### -- 2>&1 %s | FileCheck -check-prefix=avx264 %s 79 // avx264: argument unused during compilation 80 // avx264-NOT: -target-feature 81 82 void f() { 83 } 84