2014-07-12 08:40:59 +08:00
|
|
|
// REQUIRES: x86-registered-target
|
|
|
|
|
|
|
|
// We support -m32 and -m64. We support all x86 CPU feature flags in gcc's -m
|
|
|
|
// flag space.
|
|
|
|
// RUN: %clang_cl /Zs /WX -m32 -m64 -msse3 -msse4.1 -mavx -mno-avx \
|
2014-07-17 02:31:25 +08:00
|
|
|
// RUN: --target=i386-pc-win32 -### -- 2>&1 %s | FileCheck -check-prefix=MFLAGS %s
|
2014-07-12 08:40:59 +08:00
|
|
|
// MFLAGS-NOT: argument unused during compilation
|
|
|
|
|
2014-07-24 01:09:26 +08:00
|
|
|
// RUN: %clang_cl -m32 -arch:IA32 --target=i386 -### -- 2>&1 %s | FileCheck -check-prefix=IA32 %s
|
2015-07-01 00:32:04 +08:00
|
|
|
// IA32: "-target-cpu" "i386"
|
2014-07-16 02:27:51 +08:00
|
|
|
// IA32-NOT: -target-feature
|
2015-07-01 00:32:04 +08:00
|
|
|
// IA32-NOT: argument unused during compilation
|
2014-07-16 02:27:51 +08:00
|
|
|
|
2014-07-24 01:09:26 +08:00
|
|
|
// RUN: %clang_cl -m32 -arch:ia32 --target=i386 -### -- 2>&1 %s | FileCheck -check-prefix=ia32 %s
|
2014-07-16 02:27:51 +08:00
|
|
|
// ia32: argument unused during compilation
|
|
|
|
// ia32-NOT: -target-feature
|
|
|
|
|
2014-07-24 01:09:26 +08:00
|
|
|
// RUN: %clang_cl -m64 -arch:IA32 --target=x86_64 -### -- 2>&1 %s | FileCheck -check-prefix=IA3264 %s
|
2014-07-16 02:27:51 +08:00
|
|
|
// IA3264: argument unused during compilation
|
|
|
|
// IA3264-NOT: -target-feature
|
|
|
|
|
2014-07-24 01:09:26 +08:00
|
|
|
// RUN: %clang_cl -m32 -arch:SSE --target=i386 -### -- 2>&1 %s | FileCheck -check-prefix=SSE %s
|
2015-07-01 00:32:04 +08:00
|
|
|
// SSE: "-target-cpu" "pentium3"
|
2014-07-16 02:27:51 +08:00
|
|
|
// SSE: -target-feature
|
|
|
|
// SSE: +sse
|
|
|
|
// SSE-NOT: argument unused during compilation
|
|
|
|
|
2014-07-24 01:09:26 +08:00
|
|
|
// RUN: %clang_cl -m32 -arch:sse --target=i386 -### -- 2>&1 %s | FileCheck -check-prefix=sse %s
|
2014-07-16 02:27:51 +08:00
|
|
|
// sse: argument unused during compilation
|
|
|
|
// sse-NOT: -target-feature
|
|
|
|
|
2014-07-24 01:09:26 +08:00
|
|
|
// RUN: %clang_cl -m32 -arch:SSE2 --target=i386 -### -- 2>&1 %s | FileCheck -check-prefix=SSE2 %s
|
2015-07-01 00:32:04 +08:00
|
|
|
// SSE2: "-target-cpu" "pentium4"
|
2014-07-16 02:27:51 +08:00
|
|
|
// SSE2: -target-feature
|
|
|
|
// SSE2: +sse2
|
|
|
|
// SSE2-NOT: argument unused during compilation
|
|
|
|
|
2014-07-24 01:09:26 +08:00
|
|
|
// RUN: %clang_cl -m32 -arch:sse2 --target=i386 -### -- 2>&1 %s | FileCheck -check-prefix=sse %s
|
2014-07-16 02:27:51 +08:00
|
|
|
// sse2: argument unused during compilation
|
|
|
|
// sse2-NOT: -target-feature
|
|
|
|
|
2014-07-24 01:09:26 +08:00
|
|
|
// RUN: %clang_cl -m64 -arch:SSE --target=x86_64 -### -- 2>&1 %s | FileCheck -check-prefix=SSE64 %s
|
2014-07-16 02:27:51 +08:00
|
|
|
// SSE64: argument unused during compilation
|
|
|
|
// SSE64-NOT: -target-feature
|
2015-07-01 00:32:04 +08:00
|
|
|
// SSE64-NOT: pentium3
|
2014-07-16 02:27:51 +08:00
|
|
|
|
2014-07-24 01:09:26 +08:00
|
|
|
// RUN: %clang_cl -m64 -arch:SSE2 --target=x86_64 -### -- 2>&1 %s | FileCheck -check-prefix=SSE264 %s
|
2014-07-16 02:27:51 +08:00
|
|
|
// SSE264: argument unused during compilation
|
|
|
|
// SSE264-NOT: -target-feature
|
|
|
|
|
2014-07-24 01:09:26 +08:00
|
|
|
// RUN: %clang_cl -m32 -arch:AVX --target=i386 -### -- 2>&1 %s | FileCheck -check-prefix=AVX %s
|
2015-07-01 00:32:04 +08:00
|
|
|
// AVX: "-target-cpu" "sandybridge"
|
2014-07-16 02:27:51 +08:00
|
|
|
// AVX: -target-feature
|
|
|
|
// AVX: +avx
|
|
|
|
|
2014-07-24 01:09:26 +08:00
|
|
|
// RUN: %clang_cl -m32 -arch:avx --target=i386 -### -- 2>&1 %s | FileCheck -check-prefix=avx %s
|
2014-07-16 02:27:51 +08:00
|
|
|
// avx: argument unused during compilation
|
|
|
|
// avx-NOT: -target-feature
|
|
|
|
|
2014-07-24 01:09:26 +08:00
|
|
|
// RUN: %clang_cl -m32 -arch:AVX2 --target=i386 -### -- 2>&1 %s | FileCheck -check-prefix=AVX2 %s
|
2015-07-01 00:32:04 +08:00
|
|
|
// AVX2: "-target-cpu" "haswell"
|
2014-07-16 02:27:51 +08:00
|
|
|
// AVX2: -target-feature
|
|
|
|
// AVX2: +avx2
|
|
|
|
|
2014-07-24 01:09:26 +08:00
|
|
|
// RUN: %clang_cl -m32 -arch:avx2 --target=i386 -### -- 2>&1 %s | FileCheck -check-prefix=avx2 %s
|
2014-07-16 02:27:51 +08:00
|
|
|
// avx2: argument unused during compilation
|
|
|
|
// avx2-NOT: -target-feature
|
|
|
|
|
2014-07-24 01:09:26 +08:00
|
|
|
// RUN: %clang_cl -m64 -arch:AVX --target=x86_64 -### -- 2>&1 %s | FileCheck -check-prefix=AVX64 %s
|
2015-07-01 00:32:04 +08:00
|
|
|
// AVX64: "-target-cpu" "sandybridge"
|
2014-07-16 02:27:51 +08:00
|
|
|
// AVX64: -target-feature
|
|
|
|
// AVX64: +avx
|
|
|
|
|
2014-07-24 01:09:26 +08:00
|
|
|
// RUN: %clang_cl -m64 -arch:avx --target=x86_64 -### -- 2>&1 %s | FileCheck -check-prefix=avx64 %s
|
2014-07-16 02:27:51 +08:00
|
|
|
// avx64: argument unused during compilation
|
|
|
|
// avx64-NOT: -target-feature
|
|
|
|
|
2014-07-24 01:09:26 +08:00
|
|
|
// RUN: %clang_cl -m64 -arch:AVX2 --target=x86_64 -### -- 2>&1 %s | FileCheck -check-prefix=AVX264 %s
|
2015-07-01 00:32:04 +08:00
|
|
|
// AVX264: "-target-cpu" "haswell"
|
2014-07-16 02:27:51 +08:00
|
|
|
// AVX264: -target-feature
|
|
|
|
// AVX264: +avx2
|
|
|
|
|
2014-07-24 01:09:26 +08:00
|
|
|
// RUN: %clang_cl -m64 -arch:avx2 --target=x86_64 -### -- 2>&1 %s | FileCheck -check-prefix=avx264 %s
|
2014-07-16 02:27:51 +08:00
|
|
|
// avx264: argument unused during compilation
|
|
|
|
// avx264-NOT: -target-feature
|
|
|
|
|
2014-07-12 08:40:59 +08:00
|
|
|
void f() {
|
|
|
|
}
|