]> granicus.if.org Git - clang/commit
[clang-cl] Add support for /arch:AVX512F and /arch:AVX512
authorNico Weber <nicolasweber@gmx.de>
Thu, 25 Jan 2018 15:24:43 +0000 (15:24 +0000)
committerNico Weber <nicolasweber@gmx.de>
Thu, 25 Jan 2018 15:24:43 +0000 (15:24 +0000)
commit64081fe81014a3957542b9d239244a34076c0d4b
tree0f3f7a85e71d90324b976b114c728f265a0f29ee
parent96b4d114c73144574569f74e1e04e14f64513026
[clang-cl] Add support for /arch:AVX512F and /arch:AVX512

For /arch:AVX512F:
clang-cl and cl.exe both defines __AVX512F__ __AVX512CD__.
clang-cl also defines __AVX512ER__ __AVX512PF__.
64-bit cl.exe also defines (according to /Bz) _NO_PREFETCHW.

For /arch:AVX512:
clang-cl and cl.exe both define
__AVX512F__ __AVX512CD__ __AVX512BW__ __AVX512DQ__ __AVX512VL__.
64-bit cl.exe also defines _NO_PREFETCHW.

So not 100% identical, but pretty close.

Also refactor the existing AVX / AVX2 code to not repeat itself in both the
32-bit and 64-bit cases.

https://reviews.llvm.org/D42538

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@323433 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Driver/ToolChains/Arch/X86.cpp
test/Driver/cl-x86-flags.c