diff options
author | Vassil Vassilev <v.g.vassilev@gmail.com> | 2017-06-09 16:42:26 +0000 |
---|---|---|
committer | Vassil Vassilev <v.g.vassilev@gmail.com> | 2017-06-09 16:42:26 +0000 |
commit | 38ed6a1f94bdcc560f4d1968e69052d0d9e29711 (patch) | |
tree | ba40a084e43ff3177fcd10cee0d95b1c93e45411 /test/Sema | |
parent | 3148514e3baca9b32f9da60915df952cc8b227b9 (diff) |
Repair 2010-05-31-palignr.c test
This test was silently failing since a long time because it failed to include
stdlib.h (as it's running in a freestanding environment). However, because we
used just not clang_cc1 instead of the verify mode, this regression was never
noticed and the test was just always passing.
This adds -ffreestanding to the invocation, so that tmmintrin.h doesn't
indirectly include mm_malloc.h, which in turns includes the unavailable stdlib.h.
We also run now in the -verify mode to prevent that we silently regress again.
I've also updated the test to no longer check the return value of _mm_alignr_epi8
as this is also causing it to fail (and it's not really the job of this test to
test this).
Patch by Raphael Isemann (D34022)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@305089 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Sema')
-rw-r--r-- | test/Sema/2010-05-31-palignr.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/test/Sema/2010-05-31-palignr.c b/test/Sema/2010-05-31-palignr.c index 12be29af95..7492e27247 100644 --- a/test/Sema/2010-05-31-palignr.c +++ b/test/Sema/2010-05-31-palignr.c @@ -1,13 +1,12 @@ -// RUN: not %clang_cc1 -triple x86_64-apple-darwin -emit-llvm -o /dev/null %s +// RUN: %clang_cc1 -ffreestanding -verify -fsyntax-only %s #include <tmmintrin.h> +#include <stdint.h> extern int i; int main () { -#if defined( __SSSE3__ ) - typedef int16_t vSInt16 __attribute__ ((__vector_size__ (16))); short dtbl[] = {1,2,3,4,5,6,7,8}; @@ -15,8 +14,7 @@ int main () vSInt16 v0; v0 = *vdtbl; - v0 = _mm_alignr_epi8(v0, v0, i); // expected-error {{argument to '__builtin_ia32_palignr128' must be a constant integer}} + _mm_alignr_epi8(v0, v0, i); // expected-error {{argument to '__builtin_ia32_palignr128' must be a constant integer}} return 0; -#endif } |