[x86] remove RUNs that were checking fully optimized IR

Clang regression tests that depend on the optimizer can break
when there are changes to LLVM...as in: 
https://reviews.llvm.org/rL314117

llvm-svn: 314144
This commit is contained in:
Sanjay Patel 2017-09-25 19:56:57 +00:00
parent 82b7103a69
commit 1acd2cf15a
2 changed files with 2546 additions and 421 deletions

File diff suppressed because it is too large Load Diff

View File

@ -1,9 +1,5 @@
// RUN: %clang_cc1 -ffreestanding %s -triple=x86_64-apple-darwin -target-feature +avx512f -emit-llvm -o - -Wall -Werror | FileCheck %s
// FIXME: It's wrong to check LLVM IR transformations from clang. This run should be removed and tests added to the appropriate LLVM pass.
// RUN: %clang_cc1 -ffreestanding %s -triple=x86_64-apple-darwin -target-feature +avx512f -O2 -emit-llvm -o - -Wall -Werror | FileCheck %s -check-prefix=O2
#include <immintrin.h>
__m512d test_mm512_sqrt_pd(__m512d a)
@ -8309,138 +8305,95 @@ __m512d test_mm512_setzero_pd()
__mmask16 test_mm512_int2mask(int __a)
{
// O2-LABEL: test_mm512_int2mask
// O2: trunc i32 %__a to i16
// CHECK-LABEL: test_mm512_int2mask
// CHECK: trunc i32 %1 to i16
return _mm512_int2mask(__a);
}
int test_mm512_mask2int(__mmask16 __a)
{
// O2-LABEL: test_mm512_mask2int
// O2: zext i16 %__a to i32
// CHECK-LABEL: test_mm512_mask2int
// CHECK: zext i16 %1 to i32
return _mm512_mask2int(__a);
}
__m128 test_mm_mask_move_ss (__m128 __W, __mmask8 __U, __m128 __A, __m128 __B)
{
// O2-LABEL: @test_mm_mask_move_ss
// O2: %[[M:.*]] = and i8 %__U, 1
// O2: %[[M2:.*]] = icmp
// O2: %[[ELM1:.*]] = extractelement <4 x float>
// O2: %[[ELM2:.*]] = extractelement <4 x float>
// O2: %[[SEL:.*]] = select i1 %[[M2]]
// O2: %[[RES:.*]] = insertelement <4 x float> %__A, float %[[SEL]], i32 0
// O2: ret <4 x float> %[[RES]]
// CHECK-LABEL: @test_mm_mask_move_ss
// CHECK: %vecext.i = extractelement <4 x float> %6, i32 0
// CHECK: %vecext1.i = extractelement <4 x float> %7, i32 0
// CHECK: %cond.i = phi float [ %vecext.i, %cond.true.i ], [ %vecext1.i, %cond.false.i ]
// CHECK: %vecins.i = insertelement <4 x float> %8, float %cond.i, i32 0
return _mm_mask_move_ss ( __W, __U, __A, __B);
}
__m128 test_mm_maskz_move_ss (__mmask8 __U, __m128 __A, __m128 __B)
{
// O2-LABEL: @test_mm_maskz_move_ss
// O2: %[[M:.*]] = and i8 %__U, 1
// O2: %[[M2:.*]] = icmp
// O2: %[[ELM1:.*]] = extractelement <4 x float> %__B, i32 0
// O2: %[[SEL:.*]] = select i1 %[[M2]]
// O2: %[[RES:.*]] = insertelement <4 x float> %__A, float %[[SEL]], i32 0
// O2: ret <4 x float> %[[RES]]
// CHECK-LABEL: @test_mm_maskz_move_ss
// CHECK: %vecext.i = extractelement <4 x float> %5, i32 0
// CHECK: %cond.i = phi float [ %vecext.i, %cond.true.i ], [ 0.000000e+00, %cond.false.i ]
// CHECK: %vecins.i = insertelement <4 x float> %6, float %cond.i, i32 0
return _mm_maskz_move_ss (__U, __A, __B);
}
__m128d test_mm_mask_move_sd (__m128d __W, __mmask8 __U, __m128d __A, __m128d __B)
{
// O2-LABEL: @test_mm_mask_move_sd
// O2: %[[M:.*]] = and i8 %__U, 1
// O2: %[[M2:.*]] = icmp
// O2: %[[ELM1:.*]] = extractelement <2 x double>
// O2: %[[ELM2:.*]] = extractelement <2 x double>
// O2: %[[SEL:.*]] = select i1 %[[M2]]
// O2: %[[RES:.*]] = insertelement <2 x double> %__A, double %[[SEL]], i32 0
// O2: ret <2 x double> %[[RES]]
// CHECK-LABEL: @test_mm_mask_move_sd
// CHECK: %vecext.i = extractelement <2 x double> %6, i32 0
// CHECK: %vecext1.i = extractelement <2 x double> %7, i32 0
// CHECK: %cond.i = phi double [ %vecext.i, %cond.true.i ], [ %vecext1.i, %cond.false.i ]
// CHECK: %vecins.i = insertelement <2 x double> %8, double %cond.i, i32 0
return _mm_mask_move_sd ( __W, __U, __A, __B);
}
__m128d test_mm_maskz_move_sd (__mmask8 __U, __m128d __A, __m128d __B)
{
// O2-LABEL: @test_mm_maskz_move_sd
// O2: %[[M:.*]] = and i8 %__U, 1
// O2: %[[M2:.*]] = icmp
// O2: %[[ELM1:.*]] = extractelement <2 x double> %__B, i32 0
// O2: %[[SEL:.*]] = select i1 %[[M2]]
// O2: %[[RES:.*]] = insertelement <2 x double> %__A, double %[[SEL]], i32 0
// O2: ret <2 x double> %[[RES]]
// CHECK-LABEL: @test_mm_maskz_move_sd
// CHECK: %vecext.i = extractelement <2 x double> %5, i32 0
// CHECK: %cond.i = phi double [ %vecext.i, %cond.true.i ], [ 0.000000e+00, %cond.false.i ]
// CHECK: %vecins.i = insertelement <2 x double> %6, double %cond.i, i32 0
return _mm_maskz_move_sd (__U, __A, __B);
}
void test_mm_mask_store_ss(float * __P, __mmask8 __U, __m128 __A)
{
// O2-LABEL: @test_mm_mask_store_ss
// O2: %[[CAST:.*]] = bitcast float* %__P to <16 x float>*
// O2: %[[SHUFFLE:.*]] = shufflevector <4 x float> %__A, <4 x float> undef, <16 x i32> <i32 0, i32 1, i32 2, i32 3, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef>
// O2: %[[MASK1:.*]] = and i8 %__U, 1
// O2: %[[MASK2:.*]] = zext i8 %[[MASK1]] to i16
// O2: %[[MASK3:.*]] = bitcast i16 %[[MASK2]] to <16 x i1>
// O2: tail call void @llvm.masked.store.v16f32.p0v16f32(<16 x float> %[[SHUFFLE]], <16 x float>* %[[CAST]], i32 16, <16 x i1> %[[MASK3]])
// CHECK-LABEL: @test_mm_mask_store_ss
// CHECK: call void @llvm.masked.store.v16f32.p0v16f32(
_mm_mask_store_ss(__P, __U, __A);
}
void test_mm_mask_store_sd(double * __P, __mmask8 __U, __m128d __A)
{
// O2-LABEL: @test_mm_mask_store_sd
// O2: %[[CAST:.*]] = bitcast double* %__P to <8 x double>*
// O2: %[[SHUFFLE:.*]] = shufflevector <2 x double> %__A, <2 x double> undef, <8 x i32> <i32 0, i32 1, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef>
// O2: %[[MASK1:.*]] = and i8 %__U, 1
// O2: %[[MASK2:.*]] = bitcast i8 %[[MASK1]] to <8 x i1>
// O2: tail call void @llvm.masked.store.v8f64.p0v8f64(<8 x double> %[[SHUFFLE]], <8 x double>* %[[CAST]], i32 16, <8 x i1> %[[MASK2]])
// CHECK-LABEL: @test_mm_mask_store_sd
// CHECK: call void @llvm.masked.store.v8f64.p0v8f64(
_mm_mask_store_sd(__P, __U, __A);
}
__m128 test_mm_mask_load_ss(__m128 __A, __mmask8 __U, const float* __W)
{
// O2-LABEL: @test_mm_mask_load_ss
// O2: %[[SHUF:.*]] = shufflevector <4 x float> %__A, <4 x float> <float 0.000000e+00, float undef, float undef, float undef>, <4 x i32> <i32 0, i32 4, i32 4, i32 4>
// O2: %[[PTR:.*]] = bitcast float* %__W to <16 x float>*
// O2: %[[SHUF2:.*]] = shufflevector <4 x float> %[[SHUF]], <4 x float> undef, <16 x i32> <i32 0, i32 1, i32 2, i32 3, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef>
// O2: %[[AND:.*]] = and i8 %__U, 1
// O2: %[[MASK:.*]] = zext i8 %[[AND]] to i16
// O2: %[[MASK2:.*]] = bitcast i16 %[[MASK]] to <16 x i1>
// O2: %[[RES:.*]] = tail call <16 x float> @llvm.masked.load.v16f32.p0v16f32(<16 x float>* %[[PTR]], i32 16, <16 x i1> %[[MASK2]], <16 x float> %[[SHUF2]])
// O2: shufflevector <16 x float> %[[RES]], <16 x float> undef, <4 x i32> <i32 0, i32 1, i32 2, i32 3>
// CHECK-LABEL: @test_mm_mask_load_ss
// CHECK: call <16 x float> @llvm.masked.load.v16f32.p0v16f32(
return _mm_mask_load_ss(__A, __U, __W);
}
__m128 test_mm_maskz_load_ss (__mmask8 __U, const float * __W)
{
// O2-LABEL: @test_mm_maskz_load_ss
// O2: %[[PTR:.*]] = bitcast float* %__W to <16 x float>*
// O2: %[[AND:.*]] = and i8 %__U, 1
// O2: %[[MASK:.*]] = zext i8 %[[AND]] to i16
// O2: %[[MASK2:.*]] = bitcast i16 %[[MASK]] to <16 x i1>
// O2: %[[RES:.*]] = tail call <16 x float> @llvm.masked.load.v16f32.p0v16f32(<16 x float>* %[[PTR]], i32 16, <16 x i1> %[[MASK2]], <16 x float> zeroinitializer)
// O2: shufflevector <16 x float> %[[RES]], <16 x float> undef, <4 x i32> <i32 0, i32 1, i32 2, i32 3>
// CHECK-LABEL: @test_mm_maskz_load_ss
// CHECK: call <16 x float> @llvm.masked.load.v16f32.p0v16f32(
return _mm_maskz_load_ss (__U, __W);
}
__m128d test_mm_mask_load_sd (__m128d __A, __mmask8 __U, const double * __W)
{
// O2-LABEL: @test_mm_mask_load_sd
// O2: %[[SHUF:.*]] = insertelement <2 x double> %__A, double 0.000000e+00, i32 1
// O2: %[[PTR:.*]] = bitcast double* %__W to <8 x double>*
// O2: %[[SHUF2:.*]] = shufflevector <2 x double> %[[SHUF]], <2 x double> undef, <8 x i32> <i32 0, i32 1, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef>
// O2: %[[AND:.*]] = and i8 %__U, 1
// O2: %[[MASK:.*]] = bitcast i8 %[[AND]] to <8 x i1>
// O2: %[[RES:.*]] = tail call <8 x double> @llvm.masked.load.v8f64.p0v8f64(<8 x double>* %[[PTR]], i32 16, <8 x i1> %[[MASK]], <8 x double> %[[SHUF2]])
// O2: shufflevector <8 x double> %[[RES]], <8 x double> undef, <2 x i32> <i32 0, i32 1>
// CHECK-LABEL: @test_mm_mask_load_sd
// CHECK: call <8 x double> @llvm.masked.load.v8f64.p0v8f64(
return _mm_mask_load_sd (__A, __U, __W);
}
__m128d test_mm_maskz_load_sd (__mmask8 __U, const double * __W)
{
// O2-LABEL: @test_mm_maskz_load_sd
// O2: %[[PTR:.*]] = bitcast double* %__W to <8 x double>*
// O2: %[[AND:.*]] = and i8 %__U, 1
// O2: %[[MASK:.*]] = bitcast i8 %[[AND]] to <8 x i1>
// O2: %[[RES:.*]] = tail call <8 x double> @llvm.masked.load.v8f64.p0v8f64(<8 x double>* %[[PTR]], i32 16, <8 x i1> %[[MASK]], <8 x double> zeroinitializer)
// O2: shufflevector <8 x double> %[[RES]], <8 x double> undef, <2 x i32> <i32 0, i32 1>
// CHECK-LABEL: @test_mm_maskz_load_sd
// CHECK: call <8 x double> @llvm.masked.load.v8f64.p0v8f64(
return _mm_maskz_load_sd (__U, __W);
}