r310386 - [X86] Support 'avx5124vnniw' and 'avx5124fmaps' for __builtin_cpu_supports.
Craig Topper via cfe-commits
cfe-commits at lists.llvm.org
Tue Aug 8 10:43:44 PDT 2017
Author: ctopper
Date: Tue Aug 8 10:43:44 2017
New Revision: 310386
URL: http://llvm.org/viewvc/llvm-project?rev=310386&view=rev
Log:
[X86] Support 'avx5124vnniw' and 'avx5124fmaps' for __builtin_cpu_supports.
They still need to be implemented in the intrinsics, the command line, and the backend. But this change isn't dependent on any of that and resolves a TODO.
Modified:
cfe/trunk/lib/Basic/Targets/X86.cpp
cfe/trunk/lib/CodeGen/CGBuiltin.cpp
cfe/trunk/test/CodeGen/target-builtin-noerror.c
Modified: cfe/trunk/lib/Basic/Targets/X86.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Basic/Targets/X86.cpp?rev=310386&r1=310385&r2=310386&view=diff
==============================================================================
--- cfe/trunk/lib/Basic/Targets/X86.cpp (original)
+++ cfe/trunk/lib/Basic/Targets/X86.cpp Tue Aug 8 10:43:44 2017
@@ -1301,6 +1301,8 @@ bool X86TargetInfo::validateCpuSupports(
.Case("avx512pf", true)
.Case("avx512vbmi", true)
.Case("avx512ifma", true)
+ .Case("avx5124vnniw", true)
+ .Case("avx5124fmaps", true)
.Case("avx512vpopcntdq", true)
.Default(false);
}
Modified: cfe/trunk/lib/CodeGen/CGBuiltin.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGBuiltin.cpp?rev=310386&r1=310385&r2=310386&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CGBuiltin.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGBuiltin.cpp Tue Aug 8 10:43:44 2017
@@ -7375,8 +7375,8 @@ Value *CodeGenFunction::EmitX86BuiltinEx
AVX512PF,
AVX512VBMI,
AVX512IFMA,
- AVX5124VNNIW, // TODO implement this fully
- AVX5124FMAPS, // TODO implement this fully
+ AVX5124VNNIW,
+ AVX5124FMAPS,
AVX512VPOPCNTDQ,
MAX
};
@@ -7411,6 +7411,8 @@ Value *CodeGenFunction::EmitX86BuiltinEx
.Case("avx512pf", X86Features::AVX512PF)
.Case("avx512vbmi", X86Features::AVX512VBMI)
.Case("avx512ifma", X86Features::AVX512IFMA)
+ .Case("avx5124vnniw", X86Features::AVX5124VNNIW)
+ .Case("avx5124fmaps", X86Features::AVX5124FMAPS)
.Case("avx512vpopcntdq", X86Features::AVX512VPOPCNTDQ)
.Default(X86Features::MAX);
assert(Feature != X86Features::MAX && "Invalid feature!");
Modified: cfe/trunk/test/CodeGen/target-builtin-noerror.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGen/target-builtin-noerror.c?rev=310386&r1=310385&r2=310386&view=diff
==============================================================================
--- cfe/trunk/test/CodeGen/target-builtin-noerror.c (original)
+++ cfe/trunk/test/CodeGen/target-builtin-noerror.c Tue Aug 8 10:43:44 2017
@@ -72,4 +72,7 @@ void verifyfeaturestrings() {
(void)__builtin_cpu_supports("avx512pf");
(void)__builtin_cpu_supports("avx512vbmi");
(void)__builtin_cpu_supports("avx512ifma");
+ (void)__builtin_cpu_supports("avx5124vnniw");
+ (void)__builtin_cpu_supports("avx5124fmaps");
+ (void)__builtin_cpu_supports("avx512vpopcntdq");
}
More information about the cfe-commits
mailing list