diff options
| author | Eric Christopher <echristo@gmail.com> | 2015-10-27 06:11:03 +0000 |
|---|---|---|
| committer | Eric Christopher <echristo@gmail.com> | 2015-10-27 06:11:03 +0000 |
| commit | 99af5b2ea7d25f44edeb9182b926943b4666f713 (patch) | |
| tree | 37fefa512216d2c8c6cc10809886e1008407867f /clang/test/CodeGen/target-builtin-noerror.c | |
| parent | 9f690bd80bb67d483df2b9e15261e548f8b3a474 (diff) | |
| download | bcm5719-llvm-99af5b2ea7d25f44edeb9182b926943b4666f713.tar.gz bcm5719-llvm-99af5b2ea7d25f44edeb9182b926943b4666f713.zip | |
Handle target builtin options that are all required rather than
only one of a group of possibilities.
This changes the syntax in the builtin files to represent:
, as the and operator
| as the or operator
The former syntax matches how the backend tablegen files represent
multiple subtarget features being required.
Updated the builtin and intrinsic headers accordingly for the new
syntax.
llvm-svn: 251388
Diffstat (limited to 'clang/test/CodeGen/target-builtin-noerror.c')
| -rw-r--r-- | clang/test/CodeGen/target-builtin-noerror.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/clang/test/CodeGen/target-builtin-noerror.c b/clang/test/CodeGen/target-builtin-noerror.c index 569fb0a60ac..7d86b968462 100644 --- a/clang/test/CodeGen/target-builtin-noerror.c +++ b/clang/test/CodeGen/target-builtin-noerror.c @@ -29,3 +29,16 @@ int qq() { else return qq_noavx(); } + +// Test that fma and fma4 are both separately and combined valid for an fma intrinsic. +__m128 __attribute__((target("fma"))) fma_1(__m128 a, __m128 b, __m128 c) { + return __builtin_ia32_vfmaddps(a, b, c); +} + +__m128 __attribute__((target("fma4"))) fma_2(__m128 a, __m128 b, __m128 c) { + return __builtin_ia32_vfmaddps(a, b, c); +} + +__m128 __attribute__((target("fma,fma4"))) fma_3(__m128 a, __m128 b, __m128 c) { + return __builtin_ia32_vfmaddps(a, b, c); +} |

