aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2018-06-27 19:14:32 +0000
committerDimitry Andric <dim@FreeBSD.org>2018-06-27 19:14:32 +0000
commit1f031ccac56820467eff9b6d620dffca78ce122c (patch)
treefa419d82e3c7c32ffb029497374895bfe483b392 /test
parent5c8694c6ce76fdf2c8630f569e375cf343894dab (diff)
downloadsrc-1f031ccac56820467eff9b6d620dffca78ce122c.tar.gz
src-1f031ccac56820467eff9b6d620dffca78ce122c.zip
Vendor import of clang 6.0.1 release r335540:vendor/clang/clang-release_601-r335540vendor/clang-60
Notes
Notes: svn path=/vendor/clang/dist-release_60/; revision=335722 svn path=/vendor/clang/clang-release_601-r335540/; revision=335723; tag=vendor/clang/clang-release_601-r335540
Diffstat (limited to 'test')
-rw-r--r--test/CodeGen/aarch64-inline-asm.c20
-rw-r--r--test/CodeGen/attr-target-x86.c4
-rw-r--r--test/CodeGen/avx512vlbitalg-builtins.c60
-rw-r--r--test/CodeGen/avx512vlvbmi2-builtins.c300
-rw-r--r--test/CodeGen/avx512vlvnni-builtins.c72
-rw-r--r--test/CodeGen/decl.c2
-rw-r--r--test/CodeGen/function-attributes.c4
-rw-r--r--test/CodeGen/mingw-long-double.c2
-rw-r--r--test/CodeGen/ms_struct-long-double.c17
-rw-r--r--test/CodeGenCXX/const-init-cxx11.cpp2
-rw-r--r--test/CodeGenCXX/cxx0x-initializer-references.cpp2
-rw-r--r--test/CodeGenCXX/cxx0x-initializer-stdinitializerlist.cpp4
-rw-r--r--test/CodeGenObjCXX/arc-cxx11-init-list.mm2
-rw-r--r--test/Driver/Inputs/empty.cfg0
-rw-r--r--test/Driver/clang_f_opts.c7
-rw-r--r--test/Driver/config-file4.c2
-rw-r--r--test/Driver/mingw-libgcc.c13
-rw-r--r--test/Driver/mips-features.c6
-rw-r--r--test/Driver/mips-indirect-branch.c23
-rw-r--r--test/Driver/windows-cross.c10
-rw-r--r--test/Index/Inputs/reparse-issue.h3
-rw-r--r--test/Index/Inputs/reparse-issue.h-04
-rw-r--r--test/Index/Inputs/reparse-issue.h-15
-rw-r--r--test/Index/reparsed-live-issue.cpp4
-rw-r--r--test/SemaCXX/constant-expression-cxx11.cpp4
-rw-r--r--test/SemaCXX/warn-missing-variable-declarations.cpp23
26 files changed, 363 insertions, 232 deletions
diff --git a/test/CodeGen/aarch64-inline-asm.c b/test/CodeGen/aarch64-inline-asm.c
index a1078f1bab83..264df9d5fc03 100644
--- a/test/CodeGen/aarch64-inline-asm.c
+++ b/test/CodeGen/aarch64-inline-asm.c
@@ -54,3 +54,23 @@ void test_constraint_Q(void) {
asm("ldxr %0, %1" : "=r"(val) : "Q"(var));
// CHECK: call i32 asm "ldxr $0, $1", "=r,*Q"(i64* @var)
}
+
+void test_gcc_registers(void) {
+ register unsigned long reg0 asm("r0") = 0;
+ register unsigned long reg1 asm("r1") = 1;
+ register unsigned int reg29 asm("r29") = 2;
+ register unsigned int reg30 asm("r30") = 3;
+
+ // Test remapping register names in register ... asm("rN") statments.
+ // rN register operands in these two inline assembly lines
+ // should get renamed to valid AArch64 registers.
+ asm volatile("hvc #0" : : "r" (reg0), "r" (reg1));
+ // CHECK: call void asm sideeffect "hvc #0", "{x0},{x1}"
+ asm volatile("hvc #0" : : "r" (reg29), "r" (reg30));
+ // CHECK: call void asm sideeffect "hvc #0", "{fp},{lr}"
+
+ // rN registers when used without register ... asm("rN") syntax
+ // should not be remapped.
+ asm volatile("mov r0, r1\n");
+ // CHECK: call void asm sideeffect "mov r0, r1\0A", ""()
+}
diff --git a/test/CodeGen/attr-target-x86.c b/test/CodeGen/attr-target-x86.c
index 9e46de74916b..43faab37a1a9 100644
--- a/test/CodeGen/attr-target-x86.c
+++ b/test/CodeGen/attr-target-x86.c
@@ -37,10 +37,10 @@ int __attribute__((target("arch=lakemont,mmx"))) lake(int a) { return 4; }
// CHECK: qq{{.*}} #6
// CHECK: lake{{.*}} #7
// CHECK: #0 = {{.*}}"target-cpu"="i686" "target-features"="+x87"
-// CHECK: #1 = {{.*}}"target-cpu"="ivybridge" "target-features"="+aes,+avx,+cx16,+f16c,+fsgsbase,+fxsr,+mmx,+pclmul,+popcnt,+rdrnd,+sse,+sse2,+sse3,+sse4.1,+sse4.2,+ssse3,+x87,+xsave,+xsaveopt"
+// CHECK: #1 = {{.*}}"target-cpu"="ivybridge" "target-features"="+aes,+avx,+cx16,+f16c,+fsgsbase,+fxsr,+mmx,+pclmul,+popcnt,+rdrnd,+sahf,+sse,+sse2,+sse3,+sse4.1,+sse4.2,+ssse3,+x87,+xsave,+xsaveopt"
// CHECK: #2 = {{.*}}"target-cpu"="i686" "target-features"="+x87,-aes,-avx,-avx2,-avx512bitalg,-avx512bw,-avx512cd,-avx512dq,-avx512er,-avx512f,-avx512ifma,-avx512pf,-avx512vbmi,-avx512vbmi2,-avx512vl,-avx512vnni,-avx512vpopcntdq,-f16c,-fma,-fma4,-gfni,-pclmul,-sha,-sse2,-sse3,-sse4.1,-sse4.2,-sse4a,-ssse3,-vaes,-vpclmulqdq,-xop,-xsave,-xsaveopt"
// CHECK: #3 = {{.*}}"target-cpu"="i686" "target-features"="+mmx,+popcnt,+sse,+sse2,+sse3,+sse4.1,+sse4.2,+ssse3,+x87"
// CHECK: #4 = {{.*}}"target-cpu"="i686" "target-features"="+x87,-avx,-avx2,-avx512bitalg,-avx512bw,-avx512cd,-avx512dq,-avx512er,-avx512f,-avx512ifma,-avx512pf,-avx512vbmi,-avx512vbmi2,-avx512vl,-avx512vnni,-avx512vpopcntdq,-f16c,-fma,-fma4,-sse4.1,-sse4.2,-vaes,-vpclmulqdq,-xop,-xsave,-xsaveopt"
-// CHECK: #5 = {{.*}}"target-cpu"="ivybridge" "target-features"="+avx,+cx16,+f16c,+fsgsbase,+fxsr,+mmx,+pclmul,+popcnt,+rdrnd,+sse,+sse2,+sse3,+sse4.1,+sse4.2,+ssse3,+x87,+xsave,+xsaveopt,-aes,-vaes"
+// CHECK: #5 = {{.*}}"target-cpu"="ivybridge" "target-features"="+avx,+cx16,+f16c,+fsgsbase,+fxsr,+mmx,+pclmul,+popcnt,+rdrnd,+sahf,+sse,+sse2,+sse3,+sse4.1,+sse4.2,+ssse3,+x87,+xsave,+xsaveopt,-aes,-vaes"
// CHECK: #6 = {{.*}}"target-cpu"="i686" "target-features"="+x87,-3dnow,-3dnowa,-mmx"
// CHECK: #7 = {{.*}}"target-cpu"="lakemont" "target-features"="+mmx"
diff --git a/test/CodeGen/avx512vlbitalg-builtins.c b/test/CodeGen/avx512vlbitalg-builtins.c
index 9b2a1a469b2a..3dd5b68fd463 100644
--- a/test/CodeGen/avx512vlbitalg-builtins.c
+++ b/test/CodeGen/avx512vlbitalg-builtins.c
@@ -21,23 +21,23 @@ __m256i test_mm256_maskz_popcnt_epi16(__mmask16 __U, __m256i __B) {
return _mm256_maskz_popcnt_epi16(__U, __B);
}
-__m128i test_mm128_popcnt_epi16(__m128i __A) {
- // CHECK-LABEL: @test_mm128_popcnt_epi16
+__m128i test_mm_popcnt_epi16(__m128i __A) {
+ // CHECK-LABEL: @test_mm_popcnt_epi16
// CHECK: @llvm.ctpop.v8i16
- return _mm128_popcnt_epi16(__A);
+ return _mm_popcnt_epi16(__A);
}
-__m128i test_mm128_mask_popcnt_epi16(__m128i __A, __mmask8 __U, __m128i __B) {
- // CHECK-LABEL: @test_mm128_mask_popcnt_epi16
+__m128i test_mm_mask_popcnt_epi16(__m128i __A, __mmask8 __U, __m128i __B) {
+ // CHECK-LABEL: @test_mm_mask_popcnt_epi16
// CHECK: @llvm.ctpop.v8i16
// CHECK: select <8 x i1> %{{[0-9]+}}, <8 x i16> %{{[0-9]+}}, <8 x i16> {{.*}}
- return _mm128_mask_popcnt_epi16(__A, __U, __B);
+ return _mm_mask_popcnt_epi16(__A, __U, __B);
}
-__m128i test_mm128_maskz_popcnt_epi16(__mmask8 __U, __m128i __B) {
- // CHECK-LABEL: @test_mm128_maskz_popcnt_epi16
+__m128i test_mm_maskz_popcnt_epi16(__mmask8 __U, __m128i __B) {
+ // CHECK-LABEL: @test_mm_maskz_popcnt_epi16
// CHECK: @llvm.ctpop.v8i16
// CHECK: select <8 x i1> %{{[0-9]+}}, <8 x i16> %{{[0-9]+}}, <8 x i16> {{.*}}
- return _mm128_maskz_popcnt_epi16(__U, __B);
+ return _mm_maskz_popcnt_epi16(__U, __B);
}
__m256i test_mm256_popcnt_epi8(__m256i __A) {
@@ -59,46 +59,46 @@ __m256i test_mm256_maskz_popcnt_epi8(__mmask32 __U, __m256i __B) {
return _mm256_maskz_popcnt_epi8(__U, __B);
}
-__m128i test_mm128_popcnt_epi8(__m128i __A) {
- // CHECK-LABEL: @test_mm128_popcnt_epi8
+__m128i test_mm_popcnt_epi8(__m128i __A) {
+ // CHECK-LABEL: @test_mm_popcnt_epi8
// CHECK: @llvm.ctpop.v16i8
- return _mm128_popcnt_epi8(__A);
+ return _mm_popcnt_epi8(__A);
}
-__m128i test_mm128_mask_popcnt_epi8(__m128i __A, __mmask16 __U, __m128i __B) {
- // CHECK-LABEL: @test_mm128_mask_popcnt_epi8
+__m128i test_mm_mask_popcnt_epi8(__m128i __A, __mmask16 __U, __m128i __B) {
+ // CHECK-LABEL: @test_mm_mask_popcnt_epi8
// CHECK: @llvm.ctpop.v16i8
// CHECK: select <16 x i1> %{{[0-9]+}}, <16 x i8> %{{[0-9]+}}, <16 x i8> {{.*}}
- return _mm128_mask_popcnt_epi8(__A, __U, __B);
+ return _mm_mask_popcnt_epi8(__A, __U, __B);
}
-__m128i test_mm128_maskz_popcnt_epi8(__mmask16 __U, __m128i __B) {
- // CHECK-LABEL: @test_mm128_maskz_popcnt_epi8
+__m128i test_mm_maskz_popcnt_epi8(__mmask16 __U, __m128i __B) {
+ // CHECK-LABEL: @test_mm_maskz_popcnt_epi8
// CHECK: @llvm.ctpop.v16i8
// CHECK: select <16 x i1> %{{[0-9]+}}, <16 x i8> %{{[0-9]+}}, <16 x i8> {{.*}}
- return _mm128_maskz_popcnt_epi8(__U, __B);
+ return _mm_maskz_popcnt_epi8(__U, __B);
}
-__mmask32 test_mm256_mask_bitshuffle_epi32_mask(__mmask32 __U, __m256i __A, __m256i __B) {
- // CHECK-LABEL: @test_mm256_mask_bitshuffle_epi32_mask
+__mmask32 test_mm256_mask_bitshuffle_epi64_mask(__mmask32 __U, __m256i __A, __m256i __B) {
+ // CHECK-LABEL: @test_mm256_mask_bitshuffle_epi64_mask
// CHECK: @llvm.x86.avx512.mask.vpshufbitqmb.256
- return _mm256_mask_bitshuffle_epi32_mask(__U, __A, __B);
+ return _mm256_mask_bitshuffle_epi64_mask(__U, __A, __B);
}
-__mmask32 test_mm256_bitshuffle_epi32_mask(__m256i __A, __m256i __B) {
- // CHECK-LABEL: @test_mm256_bitshuffle_epi32_mask
+__mmask32 test_mm256_bitshuffle_epi64_mask(__m256i __A, __m256i __B) {
+ // CHECK-LABEL: @test_mm256_bitshuffle_epi64_mask
// CHECK: @llvm.x86.avx512.mask.vpshufbitqmb.256
- return _mm256_bitshuffle_epi32_mask(__A, __B);
+ return _mm256_bitshuffle_epi64_mask(__A, __B);
}
-__mmask16 test_mm128_mask_bitshuffle_epi16_mask(__mmask16 __U, __m128i __A, __m128i __B) {
- // CHECK-LABEL: @test_mm128_mask_bitshuffle_epi16_mask
+__mmask16 test_mm_mask_bitshuffle_epi64_mask(__mmask16 __U, __m128i __A, __m128i __B) {
+ // CHECK-LABEL: @test_mm_mask_bitshuffle_epi64_mask
// CHECK: @llvm.x86.avx512.mask.vpshufbitqmb.128
- return _mm128_mask_bitshuffle_epi16_mask(__U, __A, __B);
+ return _mm_mask_bitshuffle_epi64_mask(__U, __A, __B);
}
-__mmask16 test_mm128_bitshuffle_epi16_mask(__m128i __A, __m128i __B) {
- // CHECK-LABEL: @test_mm128_bitshuffle_epi16_mask
+__mmask16 test_mm_bitshuffle_epi64_mask(__m128i __A, __m128i __B) {
+ // CHECK-LABEL: @test_mm_bitshuffle_epi64_mask
// CHECK: @llvm.x86.avx512.mask.vpshufbitqmb.128
- return _mm128_bitshuffle_epi16_mask(__A, __B);
+ return _mm_bitshuffle_epi64_mask(__A, __B);
}
diff --git a/test/CodeGen/avx512vlvbmi2-builtins.c b/test/CodeGen/avx512vlvbmi2-builtins.c
index 6edc66d30eee..6615616c6f9b 100644
--- a/test/CodeGen/avx512vlvbmi2-builtins.c
+++ b/test/CodeGen/avx512vlvbmi2-builtins.c
@@ -2,88 +2,88 @@
#include <immintrin.h>
-__m128i test_mm128_mask_compress_epi16(__m128i __S, __mmask8 __U, __m128i __D) {
- // CHECK-LABEL: @test_mm128_mask_compress_epi16
+__m128i test_mm_mask_compress_epi16(__m128i __S, __mmask8 __U, __m128i __D) {
+ // CHECK-LABEL: @test_mm_mask_compress_epi16
// CHECK: @llvm.x86.avx512.mask.compress.w.128
- return _mm128_mask_compress_epi16(__S, __U, __D);
+ return _mm_mask_compress_epi16(__S, __U, __D);
}
-__m128i test_mm128_maskz_compress_epi16(__mmask8 __U, __m128i __D) {
- // CHECK-LABEL: @test_mm128_maskz_compress_epi16
+__m128i test_mm_maskz_compress_epi16(__mmask8 __U, __m128i __D) {
+ // CHECK-LABEL: @test_mm_maskz_compress_epi16
// CHECK: @llvm.x86.avx512.mask.compress.w.128
- return _mm128_maskz_compress_epi16(__U, __D);
+ return _mm_maskz_compress_epi16(__U, __D);
}
-__m128i test_mm128_mask_compress_epi8(__m128i __S, __mmask16 __U, __m128i __D) {
- // CHECK-LABEL: @test_mm128_mask_compress_epi8
+__m128i test_mm_mask_compress_epi8(__m128i __S, __mmask16 __U, __m128i __D) {
+ // CHECK-LABEL: @test_mm_mask_compress_epi8
// CHECK: @llvm.x86.avx512.mask.compress.b.128
- return _mm128_mask_compress_epi8(__S, __U, __D);
+ return _mm_mask_compress_epi8(__S, __U, __D);
}
-__m128i test_mm128_maskz_compress_epi8(__mmask16 __U, __m128i __D) {
- // CHECK-LABEL: @test_mm128_maskz_compress_epi8
+__m128i test_mm_maskz_compress_epi8(__mmask16 __U, __m128i __D) {
+ // CHECK-LABEL: @test_mm_maskz_compress_epi8
// CHECK: @llvm.x86.avx512.mask.compress.b.128
- return _mm128_maskz_compress_epi8(__U, __D);
+ return _mm_maskz_compress_epi8(__U, __D);
}
-void test_mm128_mask_compressstoreu_epi16(void *__P, __mmask8 __U, __m128i __D) {
- // CHECK-LABEL: @test_mm128_mask_compressstoreu_epi16
+void test_mm_mask_compressstoreu_epi16(void *__P, __mmask8 __U, __m128i __D) {
+ // CHECK-LABEL: @test_mm_mask_compressstoreu_epi16
// CHECK: @llvm.x86.avx512.mask.compress.store.w.128
- _mm128_mask_compressstoreu_epi16(__P, __U, __D);
+ _mm_mask_compressstoreu_epi16(__P, __U, __D);
}
-void test_mm128_mask_compressstoreu_epi8(void *__P, __mmask16 __U, __m128i __D) {
- // CHECK-LABEL: @test_mm128_mask_compressstoreu_epi8
+void test_mm_mask_compressstoreu_epi8(void *__P, __mmask16 __U, __m128i __D) {
+ // CHECK-LABEL: @test_mm_mask_compressstoreu_epi8
// CHECK: @llvm.x86.avx512.mask.compress.store.b.128
- _mm128_mask_compressstoreu_epi8(__P, __U, __D);
+ _mm_mask_compressstoreu_epi8(__P, __U, __D);
}
-__m128i test_mm128_mask_expand_epi16(__m128i __S, __mmask8 __U, __m128i __D) {
- // CHECK-LABEL: @test_mm128_mask_expand_epi16
+__m128i test_mm_mask_expand_epi16(__m128i __S, __mmask8 __U, __m128i __D) {
+ // CHECK-LABEL: @test_mm_mask_expand_epi16
// CHECK: @llvm.x86.avx512.mask.expand.w.128
- return _mm128_mask_expand_epi16(__S, __U, __D);
+ return _mm_mask_expand_epi16(__S, __U, __D);
}
-__m128i test_mm128_maskz_expand_epi16(__mmask8 __U, __m128i __D) {
- // CHECK-LABEL: @test_mm128_maskz_expand_epi16
+__m128i test_mm_maskz_expand_epi16(__mmask8 __U, __m128i __D) {
+ // CHECK-LABEL: @test_mm_maskz_expand_epi16
// CHECK: @llvm.x86.avx512.mask.expand.w.128
- return _mm128_maskz_expand_epi16(__U, __D);
+ return _mm_maskz_expand_epi16(__U, __D);
}
-__m128i test_mm128_mask_expand_epi8(__m128i __S, __mmask16 __U, __m128i __D) {
- // CHECK-LABEL: @test_mm128_mask_expand_epi8
+__m128i test_mm_mask_expand_epi8(__m128i __S, __mmask16 __U, __m128i __D) {
+ // CHECK-LABEL: @test_mm_mask_expand_epi8
// CHECK: @llvm.x86.avx512.mask.expand.b.128
- return _mm128_mask_expand_epi8(__S, __U, __D);
+ return _mm_mask_expand_epi8(__S, __U, __D);
}
-__m128i test_mm128_maskz_expand_epi8(__mmask16 __U, __m128i __D) {
- // CHECK-LABEL: @test_mm128_maskz_expand_epi8
+__m128i test_mm_maskz_expand_epi8(__mmask16 __U, __m128i __D) {
+ // CHECK-LABEL: @test_mm_maskz_expand_epi8
// CHECK: @llvm.x86.avx512.mask.expand.b.128
- return _mm128_maskz_expand_epi8(__U, __D);
+ return _mm_maskz_expand_epi8(__U, __D);
}
-__m128i test_mm128_mask_expandloadu_epi16(__m128i __S, __mmask8 __U, void const* __P) {
- // CHECK-LABEL: @test_mm128_mask_expandloadu_epi16
+__m128i test_mm_mask_expandloadu_epi16(__m128i __S, __mmask8 __U, void const* __P) {
+ // CHECK-LABEL: @test_mm_mask_expandloadu_epi16
// CHECK: @llvm.x86.avx512.mask.expand.load.w.128
- return _mm128_mask_expandloadu_epi16(__S, __U, __P);
+ return _mm_mask_expandloadu_epi16(__S, __U, __P);
}
-__m128i test_mm128_maskz_expandloadu_epi16(__mmask8 __U, void const* __P) {
- // CHECK-LABEL: @test_mm128_maskz_expandloadu_epi16
+__m128i test_mm_maskz_expandloadu_epi16(__mmask8 __U, void const* __P) {
+ // CHECK-LABEL: @test_mm_maskz_expandloadu_epi16
// CHECK: @llvm.x86.avx512.mask.expand.load.w.128
- return _mm128_maskz_expandloadu_epi16(__U, __P);
+ return _mm_maskz_expandloadu_epi16(__U, __P);
}
-__m128i test_mm128_mask_expandloadu_epi8(__m128i __S, __mmask16 __U, void const* __P) {
- // CHECK-LABEL: @test_mm128_mask_expandloadu_epi8
+__m128i test_mm_mask_expandloadu_epi8(__m128i __S, __mmask16 __U, void const* __P) {
+ // CHECK-LABEL: @test_mm_mask_expandloadu_epi8
// CHECK: @llvm.x86.avx512.mask.expand.load.b.128
- return _mm128_mask_expandloadu_epi8(__S, __U, __P);
+ return _mm_mask_expandloadu_epi8(__S, __U, __P);
}
-__m128i test_mm128_maskz_expandloadu_epi8(__mmask16 __U, void const* __P) {
- // CHECK-LABEL: @test_mm128_maskz_expandloadu_epi8
+__m128i test_mm_maskz_expandloadu_epi8(__mmask16 __U, void const* __P) {
+ // CHECK-LABEL: @test_mm_maskz_expandloadu_epi8
// CHECK: @llvm.x86.avx512.mask.expand.load.b.128
- return _mm128_maskz_expandloadu_epi8(__U, __P);
+ return _mm_maskz_expandloadu_epi8(__U, __P);
}
__m256i test_mm256_mask_compress_epi16(__m256i __S, __mmask16 __U, __m256i __D) {
@@ -188,22 +188,22 @@ __m256i test_mm256_shldi_epi64(__m256i __A, __m256i __B) {
return _mm256_shldi_epi64(__A, __B, 31);
}
-__m128i test_mm128_mask_shldi_epi64(__m128i __S, __mmask8 __U, __m128i __A, __m128i __B) {
- // CHECK-LABEL: @test_mm128_mask_shldi_epi64
+__m128i test_mm_mask_shldi_epi64(__m128i __S, __mmask8 __U, __m128i __A, __m128i __B) {
+ // CHECK-LABEL: @test_mm_mask_shldi_epi64
// CHECK: @llvm.x86.avx512.mask.vpshld.q.128
- return _mm128_mask_shldi_epi64(__S, __U, __A, __B, 127);
+ return _mm_mask_shldi_epi64(__S, __U, __A, __B, 127);
}
-__m128i test_mm128_maskz_shldi_epi64(__mmask8 __U, __m128i __A, __m128i __B) {
- // CHECK-LABEL: @test_mm128_maskz_shldi_epi64
+__m128i test_mm_maskz_shldi_epi64(__mmask8 __U, __m128i __A, __m128i __B) {
+ // CHECK-LABEL: @test_mm_maskz_shldi_epi64
// CHECK: @llvm.x86.avx512.mask.vpshld.q.128
- return _mm128_maskz_shldi_epi64(__U, __A, __B, 63);
+ return _mm_maskz_shldi_epi64(__U, __A, __B, 63);
}
-__m128i test_mm128_shldi_epi64(__m128i __A, __m128i __B) {
- // CHECK-LABEL: @test_mm128_shldi_epi64
+__m128i test_mm_shldi_epi64(__m128i __A, __m128i __B) {
+ // CHECK-LABEL: @test_mm_shldi_epi64
// CHECK: @llvm.x86.avx512.mask.vpshld.q.128
- return _mm128_shldi_epi64(__A, __B, 31);
+ return _mm_shldi_epi64(__A, __B, 31);
}
__m256i test_mm256_mask_shldi_epi32(__m256i __S, __mmask8 __U, __m256i __A, __m256i __B) {
@@ -224,22 +224,22 @@ __m256i test_mm256_shldi_epi32(__m256i __A, __m256i __B) {
return _mm256_shldi_epi32(__A, __B, 31);
}
-__m128i test_mm128_mask_shldi_epi32(__m128i __S, __mmask8 __U, __m128i __A, __m128i __B) {
- // CHECK-LABEL: @test_mm128_mask_shldi_epi32
+__m128i test_mm_mask_shldi_epi32(__m128i __S, __mmask8 __U, __m128i __A, __m128i __B) {
+ // CHECK-LABEL: @test_mm_mask_shldi_epi32
// CHECK: @llvm.x86.avx512.mask.vpshld.d.128
- return _mm128_mask_shldi_epi32(__S, __U, __A, __B, 127);
+ return _mm_mask_shldi_epi32(__S, __U, __A, __B, 127);
}
-__m128i test_mm128_maskz_shldi_epi32(__mmask8 __U, __m128i __A, __m128i __B) {
- // CHECK-LABEL: @test_mm128_maskz_shldi_epi32
+__m128i test_mm_maskz_shldi_epi32(__mmask8 __U, __m128i __A, __m128i __B) {
+ // CHECK-LABEL: @test_mm_maskz_shldi_epi32
// CHECK: @llvm.x86.avx512.mask.vpshld.d.128
- return _mm128_maskz_shldi_epi32(__U, __A, __B, 63);
+ return _mm_maskz_shldi_epi32(__U, __A, __B, 63);
}
-__m128i test_mm128_shldi_epi32(__m128i __A, __m128i __B) {
- // CHECK-LABEL: @test_mm128_shldi_epi32
+__m128i test_mm_shldi_epi32(__m128i __A, __m128i __B) {
+ // CHECK-LABEL: @test_mm_shldi_epi32
// CHECK: @llvm.x86.avx512.mask.vpshld.d.128
- return _mm128_shldi_epi32(__A, __B, 31);
+ return _mm_shldi_epi32(__A, __B, 31);
}
__m256i test_mm256_mask_shldi_epi16(__m256i __S, __mmask16 __U, __m256i __A, __m256i __B) {
@@ -260,22 +260,22 @@ __m256i test_mm256_shldi_epi16(__m256i __A, __m256i __B) {
return _mm256_shldi_epi16(__A, __B, 31);
}
-__m128i test_mm128_mask_shldi_epi16(__m128i __S, __mmask8 __U, __m128i __A, __m128i __B) {
- // CHECK-LABEL: @test_mm128_mask_shldi_epi16
+__m128i test_mm_mask_shldi_epi16(__m128i __S, __mmask8 __U, __m128i __A, __m128i __B) {
+ // CHECK-LABEL: @test_mm_mask_shldi_epi16
// CHECK: @llvm.x86.avx512.mask.vpshld.w.128
- return _mm128_mask_shldi_epi16(__S, __U, __A, __B, 127);
+ return _mm_mask_shldi_epi16(__S, __U, __A, __B, 127);
}
-__m128i test_mm128_maskz_shldi_epi16(__mmask8 __U, __m128i __A, __m128i __B) {
- // CHECK-LABEL: @test_mm128_maskz_shldi_epi16
+__m128i test_mm_maskz_shldi_epi16(__mmask8 __U, __m128i __A, __m128i __B) {
+ // CHECK-LABEL: @test_mm_maskz_shldi_epi16
// CHECK: @llvm.x86.avx512.mask.vpshld.w.128
- return _mm128_maskz_shldi_epi16(__U, __A, __B, 63);
+ return _mm_maskz_shldi_epi16(__U, __A, __B, 63);
}
-__m128i test_mm128_shldi_epi16(__m128i __A, __m128i __B) {
- // CHECK-LABEL: @test_mm128_shldi_epi16
+__m128i test_mm_shldi_epi16(__m128i __A, __m128i __B) {
+ // CHECK-LABEL: @test_mm_shldi_epi16
// CHECK: @llvm.x86.avx512.mask.vpshld.w.128
- return _mm128_shldi_epi16(__A, __B, 31);
+ return _mm_shldi_epi16(__A, __B, 31);
}
__m256i test_mm256_mask_shrdi_epi64(__m256i __S, __mmask8 __U, __m256i __A, __m256i __B) {
@@ -296,22 +296,22 @@ __m256i test_mm256_shrdi_epi64(__m256i __A, __m256i __B) {
return _mm256_shrdi_epi64(__A, __B, 31);
}
-__m128i test_mm128_mask_shrdi_epi64(__m128i __S, __mmask8 __U, __m128i __A, __m128i __B) {
- // CHECK-LABEL: @test_mm128_mask_shrdi_epi64
+__m128i test_mm_mask_shrdi_epi64(__m128i __S, __mmask8 __U, __m128i __A, __m128i __B) {
+ // CHECK-LABEL: @test_mm_mask_shrdi_epi64
// CHECK: @llvm.x86.avx512.mask.vpshrd.q.128
- return _mm128_mask_shrdi_epi64(__S, __U, __A, __B, 127);
+ return _mm_mask_shrdi_epi64(__S, __U, __A, __B, 127);
}
-__m128i test_mm128_maskz_shrdi_epi64(__mmask8 __U, __m128i __A, __m128i __B) {
- // CHECK-LABEL: @test_mm128_maskz_shrdi_epi64
+__m128i test_mm_maskz_shrdi_epi64(__mmask8 __U, __m128i __A, __m128i __B) {
+ // CHECK-LABEL: @test_mm_maskz_shrdi_epi64
// CHECK: @llvm.x86.avx512.mask.vpshrd.q.128
- return _mm128_maskz_shrdi_epi64(__U, __A, __B, 63);
+ return _mm_maskz_shrdi_epi64(__U, __A, __B, 63);
}
-__m128i test_mm128_shrdi_epi64(__m128i __A, __m128i __B) {
- // CHECK-LABEL: @test_mm128_shrdi_epi64
+__m128i test_mm_shrdi_epi64(__m128i __A, __m128i __B) {
+ // CHECK-LABEL: @test_mm_shrdi_epi64
// CHECK: @llvm.x86.avx512.mask.vpshrd.q.128
- return _mm128_shrdi_epi64(__A, __B, 31);
+ return _mm_shrdi_epi64(__A, __B, 31);
}
__m256i test_mm256_mask_shrdi_epi32(__m256i __S, __mmask8 __U, __m256i __A, __m256i __B) {
@@ -332,22 +332,22 @@ __m256i test_mm256_shrdi_epi32(__m256i __A, __m256i __B) {
return _mm256_shrdi_epi32(__A, __B, 31);
}
-__m128i test_mm128_mask_shrdi_epi32(__m128i __S, __mmask8 __U, __m128i __A, __m128i __B) {
- // CHECK-LABEL: @test_mm128_mask_shrdi_epi32
+__m128i test_mm_mask_shrdi_epi32(__m128i __S, __mmask8 __U, __m128i __A, __m128i __B) {
+ // CHECK-LABEL: @test_mm_mask_shrdi_epi32
// CHECK: @llvm.x86.avx512.mask.vpshrd.d.128
- return _mm128_mask_shrdi_epi32(__S, __U, __A, __B, 127);
+ return _mm_mask_shrdi_epi32(__S, __U, __A, __B, 127);
}
-__m128i test_mm128_maskz_shrdi_epi32(__mmask8 __U, __m128i __A, __m128i __B) {
- // CHECK-LABEL: @test_mm128_maskz_shrdi_epi32
+__m128i test_mm_maskz_shrdi_epi32(__mmask8 __U, __m128i __A, __m128i __B) {
+ // CHECK-LABEL: @test_mm_maskz_shrdi_epi32
// CHECK: @llvm.x86.avx512.mask.vpshrd.d.128
- return _mm128_maskz_shrdi_epi32(__U, __A, __B, 63);
+ return _mm_maskz_shrdi_epi32(__U, __A, __B, 63);
}
-__m128i test_mm128_shrdi_epi32(__m128i __A, __m128i __B) {
- // CHECK-LABEL: @test_mm128_shrdi_epi32
+__m128i test_mm_shrdi_epi32(__m128i __A, __m128i __B) {
+ // CHECK-LABEL: @test_mm_shrdi_epi32
// CHECK: @llvm.x86.avx512.mask.vpshrd.d.128
- return _mm128_shrdi_epi32(__A, __B, 31);
+ return _mm_shrdi_epi32(__A, __B, 31);
}
__m256i test_mm256_mask_shrdi_epi16(__m256i __S, __mmask16 __U, __m256i __A, __m256i __B) {
@@ -368,22 +368,22 @@ __m256i test_mm256_shrdi_epi16(__m256i __A, __m256i __B) {
return _mm256_shrdi_epi16(__A, __B, 31);
}
-__m128i test_mm128_mask_shrdi_epi16(__m128i __S, __mmask8 __U, __m128i __A, __m128i __B) {
- // CHECK-LABEL: @test_mm128_mask_shrdi_epi16
+__m128i test_mm_mask_shrdi_epi16(__m128i __S, __mmask8 __U, __m128i __A, __m128i __B) {
+ // CHECK-LABEL: @test_mm_mask_shrdi_epi16
// CHECK: @llvm.x86.avx512.mask.vpshrd.w.128
- return _mm128_mask_shrdi_epi16(__S, __U, __A, __B, 127);
+ return _mm_mask_shrdi_epi16(__S, __U, __A, __B, 127);
}
-__m128i test_mm128_maskz_shrdi_epi16(__mmask8 __U, __m128i __A, __m128i __B) {
- // CHECK-LABEL: @test_mm128_maskz_shrdi_epi16
+__m128i test_mm_maskz_shrdi_epi16(__mmask8 __U, __m128i __A, __m128i __B) {
+ // CHECK-LABEL: @test_mm_maskz_shrdi_epi16
// CHECK: @llvm.x86.avx512.mask.vpshrd.w.128
- return _mm128_maskz_shrdi_epi16(__U, __A, __B, 63);
+ return _mm_maskz_shrdi_epi16(__U, __A, __B, 63);
}
-__m128i test_mm128_shrdi_epi16(__m128i __A, __m128i __B) {
- // CHECK-LABEL: @test_mm128_shrdi_epi16
+__m128i test_mm_shrdi_epi16(__m128i __A, __m128i __B) {
+ // CHECK-LABEL: @test_mm_shrdi_epi16
// CHECK: @llvm.x86.avx512.mask.vpshrd.w.128
- return _mm128_shrdi_epi16(__A, __B, 31);
+ return _mm_shrdi_epi16(__A, __B, 31);
}
__m256i test_mm256_mask_shldv_epi64(__m256i __S, __mmask8 __U, __m256i __A, __m256i __B) {
@@ -404,22 +404,22 @@ __m256i test_mm256_shldv_epi64(__m256i __S, __m256i __A, __m256i __B) {
return _mm256_shldv_epi64(__S, __A, __B);
}
-__m128i test_mm128_mask_shldv_epi64(__m128i __S, __mmask8 __U, __m128i __A, __m128i __B) {
- // CHECK-LABEL: @test_mm128_mask_shldv_epi64
+__m128i test_mm_mask_shldv_epi64(__m128i __S, __mmask8 __U, __m128i __A, __m128i __B) {
+ // CHECK-LABEL: @test_mm_mask_shldv_epi64
// CHECK: @llvm.x86.avx512.mask.vpshldv.q.128
- return _mm128_mask_shldv_epi64(__S, __U, __A, __B);
+ return _mm_mask_shldv_epi64(__S, __U, __A, __B);
}
-__m128i test_mm128_maskz_shldv_epi64(__mmask8 __U, __m128i __S, __m128i __A, __m128i __B) {
- // CHECK-LABEL: @test_mm128_maskz_shldv_epi64
+__m128i test_mm_maskz_shldv_epi64(__mmask8 __U, __m128i __S, __m128i __A, __m128i __B) {
+ // CHECK-LABEL: @test_mm_maskz_shldv_epi64
// CHECK: @llvm.x86.avx512.maskz.vpshldv.q.128
- return _mm128_maskz_shldv_epi64(__U, __S, __A, __B);
+ return _mm_maskz_shldv_epi64(__U, __S, __A, __B);
}
-__m128i test_mm128_shldv_epi64(__m128i __S, __m128i __A, __m128i __B) {
- // CHECK-LABEL: @test_mm128_shldv_epi64
+__m128i test_mm_shldv_epi64(__m128i __S, __m128i __A, __m128i __B) {
+ // CHECK-LABEL: @test_mm_shldv_epi64
// CHECK: @llvm.x86.avx512.mask.vpshldv.q.128
- return _mm128_shldv_epi64(__S, __A, __B);
+ return _mm_shldv_epi64(__S, __A, __B);
}
__m256i test_mm256_mask_shldv_epi32(__m256i __S, __mmask8 __U, __m256i __A, __m256i __B) {
@@ -440,22 +440,22 @@ __m256i test_mm256_shldv_epi32(__m256i __S, __m256i __A, __m256i __B) {
return _mm256_shldv_epi32(__S, __A, __B);
}
-__m128i test_mm128_mask_shldv_epi32(__m128i __S, __mmask8 __U, __m128i __A, __m128i __B) {
- // CHECK-LABEL: @test_mm128_mask_shldv_epi32
+__m128i test_mm_mask_shldv_epi32(__m128i __S, __mmask8 __U, __m128i __A, __m128i __B) {
+ // CHECK-LABEL: @test_mm_mask_shldv_epi32
// CHECK: @llvm.x86.avx512.mask.vpshldv.d.128
- return _mm128_mask_shldv_epi32(__S, __U, __A, __B);
+ return _mm_mask_shldv_epi32(__S, __U, __A, __B);
}
-__m128i test_mm128_maskz_shldv_epi32(__mmask8 __U, __m128i __S, __m128i __A, __m128i __B) {
- // CHECK-LABEL: @test_mm128_maskz_shldv_epi32
+__m128i test_mm_maskz_shldv_epi32(__mmask8 __U, __m128i __S, __m128i __A, __m128i __B) {
+ // CHECK-LABEL: @test_mm_maskz_shldv_epi32
// CHECK: @llvm.x86.avx512.maskz.vpshldv.d.128
- return _mm128_maskz_shldv_epi32(__U, __S, __A, __B);
+ return _mm_maskz_shldv_epi32(__U, __S, __A, __B);
}
-__m128i test_mm128_shldv_epi32(__m128i __S, __m128i __A, __m128i __B) {
- // CHECK-LABEL: @test_mm128_shldv_epi32
+__m128i test_mm_shldv_epi32(__m128i __S, __m128i __A, __m128i __B) {
+ // CHECK-LABEL: @test_mm_shldv_epi32
// CHECK: @llvm.x86.avx512.mask.vpshldv.d.128
- return _mm128_shldv_epi32(__S, __A, __B);
+ return _mm_shldv_epi32(__S, __A, __B);
}
__m256i test_mm256_mask_shldv_epi16(__m256i __S, __mmask16 __U, __m256i __A, __m256i __B) {
@@ -476,22 +476,22 @@ __m256i test_mm256_shldv_epi16(__m256i __S, __m256i __A, __m256i __B) {
return _mm256_shldv_epi16(__S, __A, __B);
}
-__m128i test_mm128_mask_shldv_epi16(__m128i __S, __mmask8 __U, __m128i __A, __m128i __B) {
- // CHECK-LABEL: @test_mm128_mask_shldv_epi16
+__m128i test_mm_mask_shldv_epi16(__m128i __S, __mmask8 __U, __m128i __A, __m128i __B) {
+ // CHECK-LABEL: @test_mm_mask_shldv_epi16
// CHECK: @llvm.x86.avx512.mask.vpshldv.w.128
- return _mm128_mask_shldv_epi16(__S, __U, __A, __B);
+ return _mm_mask_shldv_epi16(__S, __U, __A, __B);
}
-__m128i test_mm128_maskz_shldv_epi16(__mmask8 __U, __m128i __S, __m128i __A, __m128i __B) {
- // CHECK-LABEL: @test_mm128_maskz_shldv_epi16
+__m128i test_mm_maskz_shldv_epi16(__mmask8 __U, __m128i __S, __m128i __A, __m128i __B) {
+ // CHECK-LABEL: @test_mm_maskz_shldv_epi16
// CHECK: @llvm.x86.avx512.maskz.vpshldv.w.128
- return _mm128_maskz_shldv_epi16(__U, __S, __A, __B);
+ return _mm_maskz_shldv_epi16(__U, __S, __A, __B);
}
-__m128i test_mm128_shldv_epi16(__m128i __S, __m128i __A, __m128i __B) {
- // CHECK-LABEL: @test_mm128_shldv_epi16
+__m128i test_mm_shldv_epi16(__m128i __S, __m128i __A, __m128i __B) {
+ // CHECK-LABEL: @test_mm_shldv_epi16
// CHECK: @llvm.x86.avx512.mask.vpshldv.w.128
- return _mm128_shldv_epi16(__S, __A, __B);
+ return _mm_shldv_epi16(__S, __A, __B);
}
__m256i test_mm256_mask_shrdv_epi64(__m256i __S, __mmask8 __U, __m256i __A, __m256i __B) {
@@ -512,22 +512,22 @@ __m256i test_mm256_shrdv_epi64(__m256i __S, __m256i __A, __m256i __B) {
return _mm256_shrdv_epi64(__S, __A, __B);
}
-__m128i test_mm128_mask_shrdv_epi64(__m128i __S, __mmask8 __U, __m128i __A, __m128i __B) {
- // CHECK-LABEL: @test_mm128_mask_shrdv_epi64
+__m128i test_mm_mask_shrdv_epi64(__m128i __S, __mmask8 __U, __m128i __A, __m128i __B) {
+ // CHECK-LABEL: @test_mm_mask_shrdv_epi64
// CHECK: @llvm.x86.avx512.mask.vpshrdv.q.128
- return _mm128_mask_shrdv_epi64(__S, __U, __A, __B);
+ return _mm_mask_shrdv_epi64(__S, __U, __A, __B);
}
-__m128i test_mm128_maskz_shrdv_epi64(__mmask8 __U, __m128i __S, __m128i __A, __m128i __B) {
- // CHECK-LABEL: @test_mm128_maskz_shrdv_epi64
+__m128i test_mm_maskz_shrdv_epi64(__mmask8 __U, __m128i __S, __m128i __A, __m128i __B) {
+ // CHECK-LABEL: @test_mm_maskz_shrdv_epi64
// CHECK: @llvm.x86.avx512.maskz.vpshrdv.q.128
- return _mm128_maskz_shrdv_epi64(__U, __S, __A, __B);
+ return _mm_maskz_shrdv_epi64(__U, __S, __A, __B);
}
-__m128i test_mm128_shrdv_epi64(__m128i __S, __m128i __A, __m128i __B) {
- // CHECK-LABEL: @test_mm128_shrdv_epi64
+__m128i test_mm_shrdv_epi64(__m128i __S, __m128i __A, __m128i __B) {
+ // CHECK-LABEL: @test_mm_shrdv_epi64
// CHECK: @llvm.x86.avx512.mask.vpshrdv.q.128
- return _mm128_shrdv_epi64(__S, __A, __B);
+ return _mm_shrdv_epi64(__S, __A, __B);
}
__m256i test_mm256_mask_shrdv_epi32(__m256i __S, __mmask8 __U, __m256i __A, __m256i __B) {
@@ -548,22 +548,22 @@ __m256i test_mm256_shrdv_epi32(__m256i __S, __m256i __A, __m256i __B) {
return _mm256_shrdv_epi32(__S, __A, __B);
}
-__m128i test_mm128_mask_shrdv_epi32(__m128i __S, __mmask8 __U, __m128i __A, __m128i __B) {
- // CHECK-LABEL: @test_mm128_mask_shrdv_epi32
+__m128i test_mm_mask_shrdv_epi32(__m128i __S, __mmask8 __U, __m128i __A, __m128i __B) {
+ // CHECK-LABEL: @test_mm_mask_shrdv_epi32
// CHECK: @llvm.x86.avx512.mask.vpshrdv.d.128
- return _mm128_mask_shrdv_epi32(__S, __U, __A, __B);
+ return _mm_mask_shrdv_epi32(__S, __U, __A, __B);
}
-__m128i test_mm128_maskz_shrdv_epi32(__mmask8 __U, __m128i __S, __m128i __A, __m128i __B) {
- // CHECK-LABEL: @test_mm128_maskz_shrdv_epi32
+__m128i test_mm_maskz_shrdv_epi32(__mmask8 __U, __m128i __S, __m128i __A, __m128i __B) {
+ // CHECK-LABEL: @test_mm_maskz_shrdv_epi32
// CHECK: @llvm.x86.avx512.maskz.vpshrdv.d.128
- return _mm128_maskz_shrdv_epi32(__U, __S, __A, __B);
+ return _mm_maskz_shrdv_epi32(__U, __S, __A, __B);
}
-__m128i test_mm128_shrdv_epi32(__m128i __S, __m128i __A, __m128i __B) {
- // CHECK-LABEL: @test_mm128_shrdv_epi32
+__m128i test_mm_shrdv_epi32(__m128i __S, __m128i __A, __m128i __B) {
+ // CHECK-LABEL: @test_mm_shrdv_epi32
// CHECK: @llvm.x86.avx512.mask.vpshrdv.d.128
- return _mm128_shrdv_epi32(__S, __A, __B);
+ return _mm_shrdv_epi32(__S, __A, __B);
}
__m256i test_mm256_mask_shrdv_epi16(__m256i __S, __mmask16 __U, __m256i __A, __m256i __B) {
@@ -584,21 +584,21 @@ __m256i test_mm256_shrdv_epi16(__m256i __S, __m256i __A, __m256i __B) {
return _mm256_shrdv_epi16(__S, __A, __B);
}
-__m128i test_mm128_mask_shrdv_epi16(__m128i __S, __mmask8 __U, __m128i __A, __m128i __B) {
- // CHECK-LABEL: @test_mm128_mask_shrdv_epi16
+__m128i test_mm_mask_shrdv_epi16(__m128i __S, __mmask8 __U, __m128i __A, __m128i __B) {
+ // CHECK-LABEL: @test_mm_mask_shrdv_epi16
// CHECK: @llvm.x86.avx512.mask.vpshrdv.w.128
- return _mm128_mask_shrdv_epi16(__S, __U, __A, __B);
+ return _mm_mask_shrdv_epi16(__S, __U, __A, __B);
}
-__m128i test_mm128_maskz_shrdv_epi16(__mmask8 __U, __m128i __S, __m128i __A, __m128i __B) {
- // CHECK-LABEL: @test_mm128_maskz_shrdv_epi16
+__m128i test_mm_maskz_shrdv_epi16(__mmask8 __U, __m128i __S, __m128i __A, __m128i __B) {
+ // CHECK-LABEL: @test_mm_maskz_shrdv_epi16
// CHECK: @llvm.x86.avx512.maskz.vpshrdv.w.128
- return _mm128_maskz_shrdv_epi16(__U, __S, __A, __B);
+ return _mm_maskz_shrdv_epi16(__U, __S, __A, __B);
}
-__m128i test_mm128_shrdv_epi16(__m128i __S, __m128i __A, __m128i __B) {
- // CHECK-LABEL: @test_mm128_shrdv_epi16
+__m128i test_mm_shrdv_epi16(__m128i __S, __m128i __A, __m128i __B) {
+ // CHECK-LABEL: @test_mm_shrdv_epi16
// CHECK: @llvm.x86.avx512.mask.vpshrdv.w.128
- return _mm128_shrdv_epi16(__S, __A, __B);
+ return _mm_shrdv_epi16(__S, __A, __B);
}
diff --git a/test/CodeGen/avx512vlvnni-builtins.c b/test/CodeGen/avx512vlvnni-builtins.c
index 861b915fdb29..f6265f4189f9 100644
--- a/test/CodeGen/avx512vlvnni-builtins.c
+++ b/test/CodeGen/avx512vlvnni-builtins.c
@@ -74,75 +74,75 @@ __m256i test_mm256_dpwssds_epi32(__m256i __S, __m256i __A, __m256i __B) {
return _mm256_dpwssds_epi32(__S, __A, __B);
}
-__m128i test_mm128_mask_dpbusd_epi32(__m128i __S, __mmask8 __U, __m128i __A, __m128i __B) {
- // CHECK-LABEL: @test_mm128_mask_dpbusd_epi32
+__m128i test_mm_mask_dpbusd_epi32(__m128i __S, __mmask8 __U, __m128i __A, __m128i __B) {
+ // CHECK-LABEL: @test_mm_mask_dpbusd_epi32
// CHECK: @llvm.x86.avx512.mask.vpdpbusd.128
- return _mm128_mask_dpbusd_epi32(__S, __U, __A, __B);
+ return _mm_mask_dpbusd_epi32(__S, __U, __A, __B);
}
-__m128i test_mm128_maskz_dpbusd_epi32(__mmask8 __U, __m128i __S, __m128i __A, __m128i __B) {
- // CHECK-LABEL: @test_mm128_maskz_dpbusd_epi32
+__m128i test_mm_maskz_dpbusd_epi32(__mmask8 __U, __m128i __S, __m128i __A, __m128i __B) {
+ // CHECK-LABEL: @test_mm_maskz_dpbusd_epi32
// CHECK: @llvm.x86.avx512.maskz.vpdpbusd.128
- return _mm128_maskz_dpbusd_epi32(__U, __S, __A, __B);
+ return _mm_maskz_dpbusd_epi32(__U, __S, __A, __B);
}
-__m128i test_mm128_dpbusd_epi32(__m128i __S, __m128i __A, __m128i __B) {
- // CHECK-LABEL: @test_mm128_dpbusd_epi32
+__m128i test_mm_dpbusd_epi32(__m128i __S, __m128i __A, __m128i __B) {
+ // CHECK-LABEL: @test_mm_dpbusd_epi32
// CHECK: @llvm.x86.avx512.mask.vpdpbusd.128
- return _mm128_dpbusd_epi32(__S, __A, __B);
+ return _mm_dpbusd_epi32(__S, __A, __B);
}
-__m128i test_mm128_mask_dpbusds_epi32(__m128i __S, __mmask8 __U, __m128i __A, __m128i __B) {
- // CHECK-LABEL: @test_mm128_mask_dpbusds_epi32
+__m128i test_mm_mask_dpbusds_epi32(__m128i __S, __mmask8 __U, __m128i __A, __m128i __B) {
+ // CHECK-LABEL: @test_mm_mask_dpbusds_epi32
// CHECK: @llvm.x86.avx512.mask.vpdpbusds.128
- return _mm128_mask_dpbusds_epi32(__S, __U, __A, __B);
+ return _mm_mask_dpbusds_epi32(__S, __U, __A, __B);
}
-__m128i test_mm128_maskz_dpbusds_epi32(__mmask8 __U, __m128i __S, __m128i __A, __m128i __B) {
- // CHECK-LABEL: @test_mm128_maskz_dpbusds_epi32
+__m128i test_mm_maskz_dpbusds_epi32(__mmask8 __U, __m128i __S, __m128i __A, __m128i __B) {
+ // CHECK-LABEL: @test_mm_maskz_dpbusds_epi32
// CHECK: @llvm.x86.avx512.maskz.vpdpbusds.128
- return _mm128_maskz_dpbusds_epi32(__U, __S, __A, __B);
+ return _mm_maskz_dpbusds_epi32(__U, __S, __A, __B);
}
-__m128i test_mm128_dpbusds_epi32(__m128i __S, __m128i __A, __m128i __B) {
- // CHECK-LABEL: @test_mm128_dpbusds_epi32
+__m128i test_mm_dpbusds_epi32(__m128i __S, __m128i __A, __m128i __B) {
+ // CHECK-LABEL: @test_mm_dpbusds_epi32
// CHECK: @llvm.x86.avx512.mask.vpdpbusds.128
- return _mm128_dpbusds_epi32(__S, __A, __B);
+ return _mm_dpbusds_epi32(__S, __A, __B);
}
-__m128i test_mm128_mask_dpwssd_epi32(__m128i __S, __mmask8 __U, __m128i __A, __m128i __B) {
- // CHECK-LABEL: @test_mm128_mask_dpwssd_epi32
+__m128i test_mm_mask_dpwssd_epi32(__m128i __S, __mmask8 __U, __m128i __A, __m128i __B) {
+ // CHECK-LABEL: @test_mm_mask_dpwssd_epi32
// CHECK: @llvm.x86.avx512.mask.vpdpwssd.128
- return _mm128_mask_dpwssd_epi32(__S, __U, __A, __B);
+ return _mm_mask_dpwssd_epi32(__S, __U, __A, __B);
}
-__m128i test_mm128_maskz_dpwssd_epi32(__mmask8 __U, __m128i __S, __m128i __A, __m128i __B) {
- // CHECK-LABEL: @test_mm128_maskz_dpwssd_epi32
+__m128i test_mm_maskz_dpwssd_epi32(__mmask8 __U, __m128i __S, __m128i __A, __m128i __B) {
+ // CHECK-LABEL: @test_mm_maskz_dpwssd_epi32
// CHECK: @llvm.x86.avx512.maskz.vpdpwssd.128
- return _mm128_maskz_dpwssd_epi32(__U, __S, __A, __B);
+ return _mm_maskz_dpwssd_epi32(__U, __S, __A, __B);
}
-__m128i test_mm128_dpwssd_epi32(__m128i __S, __m128i __A, __m128i __B) {
- // CHECK-LABEL: @test_mm128_dpwssd_epi32
+__m128i test_mm_dpwssd_epi32(__m128i __S, __m128i __A, __m128i __B) {
+ // CHECK-LABEL: @test_mm_dpwssd_epi32
// CHECK: @llvm.x86.avx512.mask.vpdpwssd.128
- return _mm128_dpwssd_epi32(__S, __A, __B);
+ return _mm_dpwssd_epi32(__S, __A, __B);
}
-__m128i test_mm128_mask_dpwssds_epi32(__m128i __S, __mmask8 __U, __m128i __A, __m128i __B) {
- // CHECK-LABEL: @test_mm128_mask_dpwssds_epi32
+__m128i test_mm_mask_dpwssds_epi32(__m128i __S, __mmask8 __U, __m128i __A, __m128i __B) {
+ // CHECK-LABEL: @test_mm_mask_dpwssds_epi32
// CHECK: @llvm.x86.avx512.mask.vpdpwssds.128
- return _mm128_mask_dpwssds_epi32(__S, __U, __A, __B);
+ return _mm_mask_dpwssds_epi32(__S, __U, __A, __B);
}
-__m128i test_mm128_maskz_dpwssds_epi32(__mmask8 __U, __m128i __S, __m128i __A, __m128i __B) {
- // CHECK-LABEL: @test_mm128_maskz_dpwssds_epi32
+__m128i test_mm_maskz_dpwssds_epi32(__mmask8 __U, __m128i __S, __m128i __A, __m128i __B) {
+ // CHECK-LABEL: @test_mm_maskz_dpwssds_epi32
// CHECK: @llvm.x86.avx512.maskz.vpdpwssds.128
- return _mm128_maskz_dpwssds_epi32(__U, __S, __A, __B);
+ return _mm_maskz_dpwssds_epi32(__U, __S, __A, __B);
}
-__m128i test_mm128_dpwssds_epi32(__m128i __S, __m128i __A, __m128i __B) {
- // CHECK-LABEL: @test_mm128_dpwssds_epi32
+__m128i test_mm_dpwssds_epi32(__m128i __S, __m128i __A, __m128i __B) {
+ // CHECK-LABEL: @test_mm_dpwssds_epi32
// CHECK: @llvm.x86.avx512.mask.vpdpwssds.128
- return _mm128_dpwssds_epi32(__S, __A, __B);
+ return _mm_dpwssds_epi32(__S, __A, __B);
}
diff --git a/test/CodeGen/decl.c b/test/CodeGen/decl.c
index 2065e3364bcd..2734ea7c5910 100644
--- a/test/CodeGen/decl.c
+++ b/test/CodeGen/decl.c
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -w -emit-llvm < %s | FileCheck %s
+// RUN: %clang_cc1 -w -fmerge-all-constants -emit-llvm < %s | FileCheck %s
// CHECK: @test1.x = internal constant [12 x i32] [i32 1
// CHECK: @test2.x = private unnamed_addr constant [13 x i32] [i32 1,
diff --git a/test/CodeGen/function-attributes.c b/test/CodeGen/function-attributes.c
index e14397440100..9174b8785d9e 100644
--- a/test/CodeGen/function-attributes.c
+++ b/test/CodeGen/function-attributes.c
@@ -71,7 +71,7 @@ void f15(void) {
// PR5254
// CHECK-LABEL: define void @f16
-// CHECK: [[ALIGN:#[0-9]+]]
+// CHECK: [[SR:#[0-9]+]]
// CHECK: {
void __attribute__((force_align_arg_pointer)) f16(void) {
}
@@ -112,7 +112,7 @@ void f20(void) {
// CHECK: attributes [[NUW]] = { nounwind optsize{{.*}} }
// CHECK: attributes [[AI]] = { alwaysinline nounwind optsize{{.*}} }
// CHECK: attributes [[NUW_OS_RN]] = { nounwind optsize readnone{{.*}} }
-// CHECK: attributes [[ALIGN]] = { nounwind optsize alignstack=16{{.*}} }
+// CHECK: attributes [[SR]] = { nounwind optsize{{.*}} "stackrealign"{{.*}} }
// CHECK: attributes [[RT]] = { nounwind optsize returns_twice{{.*}} }
// CHECK: attributes [[NR]] = { noreturn optsize }
// CHECK: attributes [[NUW_RN]] = { nounwind optsize readnone }
diff --git a/test/CodeGen/mingw-long-double.c b/test/CodeGen/mingw-long-double.c
index 1c7c31f88be3..166f7decfc3a 100644
--- a/test/CodeGen/mingw-long-double.c
+++ b/test/CodeGen/mingw-long-double.c
@@ -1,5 +1,7 @@
// RUN: %clang_cc1 -triple i686-windows-gnu -emit-llvm -o - %s \
// RUN: | FileCheck %s --check-prefix=GNU32
+// RUN: %clang_cc1 -triple i686-windows-gnu -emit-llvm -o - %s -mms-bitfields \
+// RUN: | FileCheck %s --check-prefix=GNU32
// RUN: %clang_cc1 -triple x86_64-windows-gnu -emit-llvm -o - %s \
// RUN: | FileCheck %s --check-prefix=GNU64
// RUN: %clang_cc1 -triple x86_64-windows-msvc -emit-llvm -o - %s \
diff --git a/test/CodeGen/ms_struct-long-double.c b/test/CodeGen/ms_struct-long-double.c
new file mode 100644
index 000000000000..9b3ea7947a03
--- /dev/null
+++ b/test/CodeGen/ms_struct-long-double.c
@@ -0,0 +1,17 @@
+// RUN: %clang_cc1 -emit-llvm-only -triple i686-windows-gnu -fdump-record-layouts %s | FileCheck %s
+// RUN: %clang_cc1 -emit-llvm-only -triple i686-linux -fdump-record-layouts -Wno-incompatible-ms-struct %s | FileCheck %s
+// RUN: not %clang_cc1 -emit-llvm-only -triple i686-linux -fdump-record-layouts %s 2>&1 | FileCheck %s -check-prefix=ERROR
+
+struct ldb_struct {
+ char c;
+ long double ldb;
+} __attribute__((__ms_struct__));
+
+struct ldb_struct a;
+
+// CHECK: 0 | struct ldb_struct
+// CHECK-NEXT: 0 | char c
+// CHECK-NEXT: 4 | long double ldb
+// CHECK-NEXT: | [sizeof=16, align=4]
+
+// ERROR: error: ms_struct may not produce Microsoft-compatible layouts with fundamental data types with sizes that aren't a power of two
diff --git a/test/CodeGenCXX/const-init-cxx11.cpp b/test/CodeGenCXX/const-init-cxx11.cpp
index c4962bc08ad6..801d7b1e19cc 100644
--- a/test/CodeGenCXX/const-init-cxx11.cpp
+++ b/test/CodeGenCXX/const-init-cxx11.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -w -triple x86_64-elf-gnu -emit-llvm -o - %s -std=c++11 | FileCheck %s
+// RUN: %clang_cc1 -w -fmerge-all-constants -triple x86_64-elf-gnu -emit-llvm -o - %s -std=c++11 | FileCheck %s
// FIXME: The padding in all these objects should be zero-initialized.
namespace StructUnion {
diff --git a/test/CodeGenCXX/cxx0x-initializer-references.cpp b/test/CodeGenCXX/cxx0x-initializer-references.cpp
index 318c8ea0d770..595d27ca2e83 100644
--- a/test/CodeGenCXX/cxx0x-initializer-references.cpp
+++ b/test/CodeGenCXX/cxx0x-initializer-references.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -std=c++11 -S -triple armv7-none-eabi -emit-llvm -o - %s | FileCheck %s
+// RUN: %clang_cc1 -std=c++11 -S -triple armv7-none-eabi -fmerge-all-constants -emit-llvm -o - %s | FileCheck %s
namespace reference {
struct A {
diff --git a/test/CodeGenCXX/cxx0x-initializer-stdinitializerlist.cpp b/test/CodeGenCXX/cxx0x-initializer-stdinitializerlist.cpp
index 67215ef48fb3..44b188568708 100644
--- a/test/CodeGenCXX/cxx0x-initializer-stdinitializerlist.cpp
+++ b/test/CodeGenCXX/cxx0x-initializer-stdinitializerlist.cpp
@@ -1,5 +1,5 @@
-// RUN: %clang_cc1 -std=c++11 -triple x86_64-none-linux-gnu -emit-llvm -o - %s | FileCheck -check-prefixes=X86,CHECK %s
-// RUN: %clang_cc1 -std=c++11 -triple amdgcn-amd-amdhsa-amdgiz -DNO_TLS -emit-llvm -o - %s | FileCheck -check-prefixes=AMD,CHECK %s
+// RUN: %clang_cc1 -std=c++11 -triple x86_64-none-linux-gnu -fmerge-all-constants -emit-llvm -o - %s | FileCheck -check-prefixes=X86,CHECK %s
+// RUN: %clang_cc1 -std=c++11 -triple amdgcn-amd-amdhsa-amdgiz -DNO_TLS -fmerge-all-constants -emit-llvm -o - %s | FileCheck -check-prefixes=AMD,CHECK %s
namespace std {
typedef decltype(sizeof(int)) size_t;
diff --git a/test/CodeGenObjCXX/arc-cxx11-init-list.mm b/test/CodeGenObjCXX/arc-cxx11-init-list.mm
index c3723c619ab0..af607654e159 100644
--- a/test/CodeGenObjCXX/arc-cxx11-init-list.mm
+++ b/test/CodeGenObjCXX/arc-cxx11-init-list.mm
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -triple armv7-ios5.0 -std=c++11 -fobjc-arc -Os -emit-llvm -o - %s | FileCheck %s
+// RUN: %clang_cc1 -triple armv7-ios5.0 -std=c++11 -fmerge-all-constants -fobjc-arc -Os -emit-llvm -o - %s | FileCheck %s
// CHECK: @[[STR0:.*]] = private unnamed_addr constant [5 x i8] c"str0\00", section "__TEXT,__cstring,cstring_literals"
// CHECK: @[[UNNAMED_CFSTRING0:.*]] = private global %struct.__NSConstantString_tag { i32* getelementptr inbounds ([0 x i32], [0 x i32]* @__CFConstantStringClassReference, i32 0, i32 0), i32 1992, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @[[STR0]], i32 0, i32 0), i32 4 }, section "__DATA,__cfstring"
diff --git a/test/Driver/Inputs/empty.cfg b/test/Driver/Inputs/empty.cfg
new file mode 100644
index 000000000000..e69de29bb2d1
--- /dev/null
+++ b/test/Driver/Inputs/empty.cfg
diff --git a/test/Driver/clang_f_opts.c b/test/Driver/clang_f_opts.c
index b22f74fb5557..e044893d3e6c 100644
--- a/test/Driver/clang_f_opts.c
+++ b/test/Driver/clang_f_opts.c
@@ -276,6 +276,7 @@
// RUN: -fno-inline-small-functions -finline-small-functions \
// RUN: -fno-fat-lto-objects -ffat-lto-objects \
// RUN: -fno-merge-constants -fmerge-constants \
+// RUN: -fno-merge-all-constants -fmerge-all-constants \
// RUN: -fno-caller-saves -fcaller-saves \
// RUN: -fno-reorder-blocks -freorder-blocks \
// RUN: -fno-schedule-insns2 -fschedule-insns2 \
@@ -503,3 +504,9 @@
// CHECK-WINDOWS-ISO10646: "-fwchar-type=int"
// CHECK-WINDOWS-ISO10646: "-fsigned-wchar"
+// RUN: %clang -### -S -fmerge-all-constants %s 2>&1 | FileCheck -check-prefix=CHECK-MERGE-ALL-CONSTANTS %s
+// RUN: %clang -### -S -fno-merge-all-constants %s 2>&1 | FileCheck -check-prefix=CHECK-NO-MERGE-ALL-CONSTANTS %s
+// RUN: %clang -### -S -fmerge-all-constants -fno-merge-all-constants %s 2>&1 | FileCheck -check-prefix=CHECK-NO-MERGE-ALL-CONSTANTS %s
+// RUN: %clang -### -S -fno-merge-all-constants -fmerge-all-constants %s 2>&1 | FileCheck -check-prefix=CHECK-MERGE-ALL-CONSTANTS %s
+// CHECK-NO-MERGE-ALL-CONSTANTS-NOT: "-fmerge-all-constants"
+// CHECK-MERGE-ALL-CONSTANTS: "-fmerge-all-constants"
diff --git a/test/Driver/config-file4.c b/test/Driver/config-file4.c
new file mode 100644
index 000000000000..9231ab64e157
--- /dev/null
+++ b/test/Driver/config-file4.c
@@ -0,0 +1,2 @@
+// RUN: %clang --config %S/Inputs/empty.cfg -Wall -Wextra -Wformat -Wstrict-aliasing -Wshadow -Wpacked -Winline -Wimplicit-function-declaration -c %s -O2 -o /dev/null -v 2>&1 | FileCheck %s -check-prefix PR37196
+// PR37196: Configuration file: {{.*}}empty.cfg
diff --git a/test/Driver/mingw-libgcc.c b/test/Driver/mingw-libgcc.c
index 1d45c91651de..bfe2360ed4e6 100644
--- a/test/Driver/mingw-libgcc.c
+++ b/test/Driver/mingw-libgcc.c
@@ -2,11 +2,11 @@
// Verified with gcc version 5.1.0 (i686-posix-dwarf-rev0, Built by MinGW-W64 project).
// gcc, static
-// RUN: %clang -v -target i686-pc-windows-gnu -rtlib=platform -### %s 2>&1 | FileCheck -check-prefix=CHECK_STATIC %s
-// RUN: %clang -static -v -target i686-pc-windows-gnu -rtlib=platform -### %s 2>&1 | FileCheck -check-prefix=CHECK_STATIC %s
-// RUN: %clang -static-libgcc -v -target i686-pc-windows-gnu -rtlib=platform -### %s 2>&1 | FileCheck -check-prefix=CHECK_STATIC %s
-// RUN: %clang -static -shared -v -target i686-pc-windows-gnu -rtlib=platform -### %s 2>&1 | FileCheck -check-prefix=CHECK_STATIC %s
-// RUN: %clang -static-libgcc -shared -v -target i686-pc-windows-gnu -rtlib=platform -### %s 2>&1 | FileCheck -check-prefix=CHECK_STATIC %s
+// RUN: %clang -v -target i686-pc-windows-gnu -rtlib=platform -### %s 2>&1 | FileCheck -check-prefixes=CHECK_STATIC,CHECK_BDYNAMIC %s
+// RUN: %clang -static -v -target i686-pc-windows-gnu -rtlib=platform -### %s 2>&1 | FileCheck -check-prefixes=CHECK_STATIC,CHECK_BSTATIC %s
+// RUN: %clang -static-libgcc -v -target i686-pc-windows-gnu -rtlib=platform -### %s 2>&1 | FileCheck -check-prefixes=CHECK_STATIC,CHECK_BDYNAMIC %s
+// RUN: %clang -static -shared -v -target i686-pc-windows-gnu -rtlib=platform -### %s 2>&1 | FileCheck -check-prefixes=CHECK_STATIC,CHECK_SHARED,CHECK_BSTATIC %s
+// RUN: %clang -static-libgcc -shared -v -target i686-pc-windows-gnu -rtlib=platform -### %s 2>&1 | FileCheck -check-prefixes=CHECK_STATIC,CHECK_SHARED,CHECK_BDYNAMIC %s
// gcc, dynamic
// RUN: %clang -shared -v -target i686-pc-windows-gnu -rtlib=platform -### %s 2>&1 | FileCheck -check-prefix=CHECK_DYNAMIC %s
@@ -21,5 +21,8 @@
// RUN: %clang --driver-mode=g++ -v -target i686-pc-windows-gnu -rtlib=platform -### %s 2>&1 | FileCheck -check-prefix=CHECK_DYNAMIC %s
// RUN: %clang -shared --driver-mode=g++ -v -target i686-pc-windows-gnu -rtlib=platform -### %s 2>&1 | FileCheck -check-prefix=CHECK_DYNAMIC %s
+// CHECK_SHARED: "--shared"
+// CHECK_BSTATIC: "-Bstatic"
+// CHECK_BDYNAMIC: "-Bdynamic"
// CHECK_STATIC: "-lgcc" "-lgcc_eh"
// CHECK_DYNAMIC: "-lgcc_s" "-lgcc"
diff --git a/test/Driver/mips-features.c b/test/Driver/mips-features.c
index a9db0f101700..d9bde7ded6f0 100644
--- a/test/Driver/mips-features.c
+++ b/test/Driver/mips-features.c
@@ -402,3 +402,9 @@
// RUN: %clang -target -mips-mti-linux-gnu -### -c %s -mno-branch-likely 2>&1 \
// RUN: | FileCheck --check-prefix=NO-BRANCH-LIKELY %s
// NO-BRANCH-LIKELY: argument unused during compilation: '-mno-branch-likely'
+
+// -mindirect-jump=hazard
+// RUN: %clang -target mips-unknown-linux-gnu -### -c %s \
+// RUN: -mindirect-jump=hazard 2>&1 \
+// RUN: | FileCheck --check-prefix=INDIRECT-BH %s
+// INDIRECT-BH: "-target-feature" "+use-indirect-jump-hazard"
diff --git a/test/Driver/mips-indirect-branch.c b/test/Driver/mips-indirect-branch.c
new file mode 100644
index 000000000000..64e85d5dc5a1
--- /dev/null
+++ b/test/Driver/mips-indirect-branch.c
@@ -0,0 +1,23 @@
+// REQUIRES: mips-registered-target
+// -mindirect-jump=hazard -mips32
+// RUN: %clang -target mips-unknown-linux-gnu -mips32 -### -c %s \
+// RUN: -mindirect-jump=hazard 2>&1 | FileCheck %s --check-prefix=MIPS32
+// MIPS32: error: '-mindirect-jump=hazard' is unsupported with the 'mips32' architecture
+
+// -mindirect-jump=hazard -mmicromips
+// RUN: %clang -target mips-unknown-linux-gnu -mmicromips -### -c %s \
+// RUN: -mindirect-jump=hazard 2>&1 | FileCheck %s --check-prefix=MICROMIPS
+// MICROMIPS: error: '-mindirect-jump=hazard' is unsupported with the 'micromips' architecture
+
+// -mindirect-jump=hazard -mips16
+// RUN: %clang -target mips-unknown-linux-gnu -mips16 -### -c %s \
+// RUN: -mindirect-jump=hazard 2>&1 | FileCheck %s --check-prefix=MIPS16
+// MIPS16: error: '-mindirect-jump=hazard' is unsupported with the 'mips16' architecture
+
+// RUN: %clang -target mips-unknown-linux-gnu -### -c %s \
+// RUN: -mindirect-jump=retopline 2>&1 | FileCheck %s --check-prefix=RETOPLINE
+// RETOPLINE: error: unknown '-mindirect-jump=' option 'retopline'
+
+// RUN: %clang -target mips-unknown-linux-gnu -### -mips32 -c %s \
+// RUN: -mindirect-jump=retopline 2>&1 | FileCheck %s --check-prefix=MIXED
+// MIXED: error: unknown '-mindirect-jump=' option 'retopline'
diff --git a/test/Driver/windows-cross.c b/test/Driver/windows-cross.c
index 4b52e99cee34..d96b0283a90e 100644
--- a/test/Driver/windows-cross.c
+++ b/test/Driver/windows-cross.c
@@ -3,6 +3,11 @@
// CHECK-BASIC-LIBCXX: armv7-windows-itanium-ld" "--sysroot={{.*}}/Inputs/Windows/ARM/8.1" "-m" "thumb2pe" "-Bdynamic" "--entry" "mainCRTStartup" "--allow-multiple-definition" "-o" "{{[^"]*}}" "{{[^"]*}}.o" "-lmsvcrt"
+// RUN: %clang -### -target armv7-windows-itanium --sysroot %S/Inputs/Windows/ARM/8.1 -B %S/Inputs/Windows/ARM/8.1/usr/bin -fuse-ld=ld -stdlib=libstdc++ -rtlib=compiler-rt -static -o /dev/null %s 2>&1 \
+// RUN: | FileCheck %s --check-prefix CHECK-STATIC
+
+// CHECK-STATIC: armv7-windows-itanium-ld" "--sysroot={{.*}}/Inputs/Windows/ARM/8.1" "-m" "thumb2pe" "-Bstatic" "--entry" "mainCRTStartup" "--allow-multiple-definition" "-o" "{{[^"]*}}" "{{[^"]*}}.o" "-lmsvcrt"
+
// RUN: %clang -### -target armv7-windows-itanium --sysroot %s/Inputs/Windows/ARM/8.1 -B %S/Inputs/Windows/ARM/8.1/usr/bin -fuse-ld=ld -rtlib=compiler-rt -stdlib=libstdc++ -o /dev/null %s 2>&1 \
// RUN: | FileCheck %s --check-prefix CHECK-RTLIB
@@ -23,6 +28,11 @@
// CHECK-SHARED: armv7-windows-itanium-ld" "--sysroot={{.*}}/Inputs/Windows/ARM/8.1" "-m" "thumb2pe" "-shared" "-Bdynamic" "--enable-auto-image-base" "--entry" "_DllMainCRTStartup" "--allow-multiple-definition" "-o" "shared.dll" "--out-implib" "shared.lib" "{{.*}}.o" "-lmsvcrt" "{{.*[\\/]}}clang_rt.builtins-arm.lib"
+// RUN: %clang -### -target armv7-windows-itanium --sysroot %S/Inputs/Windows/ARM/8.1 -B %S/Inputs/Windows/ARM/8.1/usr/bin -fuse-ld=ld -shared -rtlib=compiler-rt -stdlib=libc++ -static -o shared.dll %s 2>&1 \
+// RUN: | FileCheck %s --check-prefix CHECK-SHARED-STATIC
+
+// CHECK-SHARED-STATIC: armv7-windows-itanium-ld" "--sysroot={{.*}}/Inputs/Windows/ARM/8.1" "-m" "thumb2pe" "-shared" "-Bstatic" "--enable-auto-image-base" "--entry" "_DllMainCRTStartup" "--allow-multiple-definition" "-o" "shared.dll" "--out-implib" "shared.lib" "{{.*}}.o" "-lmsvcrt" "{{.*[\\/]}}clang_rt.builtins-arm.lib"
+
// RUN: %clang -### -target armv7-windows-itanium --sysroot %s/Inputs/Windows/ARM/8.1 -B %S/Inputs/Windows/ARM/8.1/usr/bin -fuse-ld=ld -shared -rtlib=compiler-rt -stdlib=libc++ -nostartfiles -o shared.dll %s 2>&1 \
// RUN: | FileCheck %s --check-prefix CHECK-NOSTARTFILES
diff --git a/test/Index/Inputs/reparse-issue.h b/test/Index/Inputs/reparse-issue.h
new file mode 100644
index 000000000000..79f1d88a7fc3
--- /dev/null
+++ b/test/Index/Inputs/reparse-issue.h
@@ -0,0 +1,3 @@
+
+asdf;
+
diff --git a/test/Index/Inputs/reparse-issue.h-0 b/test/Index/Inputs/reparse-issue.h-0
new file mode 100644
index 000000000000..f004abf1f5f0
--- /dev/null
+++ b/test/Index/Inputs/reparse-issue.h-0
@@ -0,0 +1,4 @@
+//
+//
+asdf;
+
diff --git a/test/Index/Inputs/reparse-issue.h-1 b/test/Index/Inputs/reparse-issue.h-1
new file mode 100644
index 000000000000..9f9dde858d47
--- /dev/null
+++ b/test/Index/Inputs/reparse-issue.h-1
@@ -0,0 +1,5 @@
+//
+//
+//
+asdf;
+
diff --git a/test/Index/reparsed-live-issue.cpp b/test/Index/reparsed-live-issue.cpp
new file mode 100644
index 000000000000..56423de0b72a
--- /dev/null
+++ b/test/Index/reparsed-live-issue.cpp
@@ -0,0 +1,4 @@
+// RUN: env CINDEXTEST_EDITING=1 LIBCLANG_DISABLE_CRASH_RECOVERY=1 c-index-test -test-load-source-reparse 2 none -remap-file-0=%S/Inputs/reparse-issue.h,%S/Inputs/reparse-issue.h-0 -remap-file-1=%S/Inputs/reparse-issue.h,%S/Inputs/reparse-issue.h-1 -- %s 2>&1 | FileCheck %s
+#include "Inputs/reparse-issue.h"
+
+// CHECK: reparse-issue.h:4:1:{1:1-1:1}: error: C++ requires a type specifier for all declarations
diff --git a/test/SemaCXX/constant-expression-cxx11.cpp b/test/SemaCXX/constant-expression-cxx11.cpp
index 51dd6199e63a..fe4c54e7e6f2 100644
--- a/test/SemaCXX/constant-expression-cxx11.cpp
+++ b/test/SemaCXX/constant-expression-cxx11.cpp
@@ -629,6 +629,10 @@ namespace ArrayOfUnknownBound {
extern const int carr[]; // expected-note {{here}}
constexpr int n = carr[0]; // expected-error {{constant}} expected-note {{non-constexpr variable}}
+
+ constexpr int local_extern[] = {1, 2, 3};
+ void f() { extern const int local_extern[]; }
+ static_assert(local_extern[1] == 2, "");
}
namespace DependentValues {
diff --git a/test/SemaCXX/warn-missing-variable-declarations.cpp b/test/SemaCXX/warn-missing-variable-declarations.cpp
index 5b882845f3c6..5b71f38c811f 100644
--- a/test/SemaCXX/warn-missing-variable-declarations.cpp
+++ b/test/SemaCXX/warn-missing-variable-declarations.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang -Wmissing-variable-declarations -fsyntax-only -Xclang -verify %s
+// RUN: %clang -Wmissing-variable-declarations -fsyntax-only -Xclang -verify -std=c++17 %s
// Variable declarations that should trigger a warning.
int vbad1; // expected-warning{{no previous extern declaration for non-static variable 'vbad1'}}
@@ -52,3 +52,24 @@ class C {
namespace {
int vgood4;
}
+
+inline int inline_var = 0;
+const int const_var = 0;
+constexpr int constexpr_var = 0;
+inline constexpr int inline_constexpr_var = 0;
+extern const int extern_const_var = 0; // expected-warning {{no previous extern declaration}}
+extern constexpr int extern_constexpr_var = 0; // expected-warning {{no previous extern declaration}}
+
+template<typename> int var_template = 0;
+template<typename> constexpr int const_var_template = 0;
+template<typename> static int static_var_template = 0;
+
+template int var_template<int[1]>;
+int use_var_template() { return var_template<int[2]>; }
+template int var_template<int[3]>;
+extern template int var_template<int[4]>;
+template<> int var_template<int[5]>; // expected-warning {{no previous extern declaration}}
+
+// FIXME: We give this specialization internal linkage rather than inheriting
+// the linkage from the template! We should not warn here.
+template<> int static_var_template<int[5]>; // expected-warning {{no previous extern declaration}}