diff options
author | Stephen Hines <srhines@google.com> | 2015-03-23 12:10:34 -0700 |
---|---|---|
committer | Stephen Hines <srhines@google.com> | 2015-03-23 12:10:34 -0700 |
commit | ebe69fe11e48d322045d5949c83283927a0d790b (patch) | |
tree | c92f1907a6b8006628a4b01615f38264d29834ea /test/CodeGen/X86/avx512-vbroadcast.ll | |
parent | b7d2e72b02a4cb8034f32f8247a2558d2434e121 (diff) | |
download | external_llvm-ebe69fe11e48d322045d5949c83283927a0d790b.zip external_llvm-ebe69fe11e48d322045d5949c83283927a0d790b.tar.gz external_llvm-ebe69fe11e48d322045d5949c83283927a0d790b.tar.bz2 |
Update aosp/master LLVM for rebase to r230699.
Change-Id: I2b5be30509658cb8266be782de0ab24f9099f9b9
Diffstat (limited to 'test/CodeGen/X86/avx512-vbroadcast.ll')
-rw-r--r-- | test/CodeGen/X86/avx512-vbroadcast.ll | 120 |
1 files changed, 120 insertions, 0 deletions
diff --git a/test/CodeGen/X86/avx512-vbroadcast.ll b/test/CodeGen/X86/avx512-vbroadcast.ll index 0b0e0fc..5bb8233 100644 --- a/test/CodeGen/X86/avx512-vbroadcast.ll +++ b/test/CodeGen/X86/avx512-vbroadcast.ll @@ -20,6 +20,14 @@ define <8 x i64> @_inreg8xi64(i64 %a) { ret <8 x i64> %c } +;CHECK-LABEL: _ss16xfloat_v4 +;CHECK: vbroadcastss %xmm0, %zmm0 +;CHECK: ret +define <16 x float> @_ss16xfloat_v4(<4 x float> %a) { + %b = shufflevector <4 x float> %a, <4 x float> undef, <16 x i32> zeroinitializer + ret <16 x float> %b +} + define <16 x float> @_inreg16xfloat(float %a) { ; CHECK-LABEL: _inreg16xfloat: ; CHECK: ## BB#0: @@ -30,6 +38,62 @@ define <16 x float> @_inreg16xfloat(float %a) { ret <16 x float> %c } +;CHECK-LABEL: _ss16xfloat_mask: +;CHECK: vbroadcastss %xmm0, %zmm1 {%k1} +;CHECK: ret +define <16 x float> @_ss16xfloat_mask(float %a, <16 x float> %i, <16 x i32> %mask1) { + %mask = icmp ne <16 x i32> %mask1, zeroinitializer + %b = insertelement <16 x float> undef, float %a, i32 0 + %c = shufflevector <16 x float> %b, <16 x float> undef, <16 x i32> zeroinitializer + %r = select <16 x i1> %mask, <16 x float> %c, <16 x float> %i + ret <16 x float> %r +} + +;CHECK-LABEL: _ss16xfloat_maskz: +;CHECK: vbroadcastss %xmm0, %zmm0 {%k1} {z} +;CHECK: ret +define <16 x float> @_ss16xfloat_maskz(float %a, <16 x i32> %mask1) { + %mask = icmp ne <16 x i32> %mask1, zeroinitializer + %b = insertelement <16 x float> undef, float %a, i32 0 + %c = shufflevector <16 x float> %b, <16 x float> undef, <16 x i32> zeroinitializer + %r = select <16 x i1> %mask, <16 x float> %c, <16 x float> zeroinitializer + ret <16 x float> %r +} + +;CHECK-LABEL: _ss16xfloat_load: +;CHECK: vbroadcastss (%{{.*}}, %zmm +;CHECK: ret +define <16 x float> @_ss16xfloat_load(float* %a.ptr) { + %a = load float* %a.ptr + %b = insertelement <16 x float> undef, float %a, i32 0 + %c = shufflevector <16 x float> %b, <16 x float> undef, <16 x i32> zeroinitializer + ret <16 x float> %c +} + +;CHECK-LABEL: _ss16xfloat_mask_load: +;CHECK: vbroadcastss (%rdi), %zmm0 {%k1} +;CHECK: ret +define <16 x float> @_ss16xfloat_mask_load(float* %a.ptr, <16 x float> %i, <16 x i32> %mask1) { + %a = load float* %a.ptr + %mask = icmp ne <16 x i32> %mask1, zeroinitializer + %b = insertelement <16 x float> undef, float %a, i32 0 + %c = shufflevector <16 x float> %b, <16 x float> undef, <16 x i32> zeroinitializer + %r = select <16 x i1> %mask, <16 x float> %c, <16 x float> %i + ret <16 x float> %r +} + +;CHECK-LABEL: _ss16xfloat_maskz_load: +;CHECK: vbroadcastss (%rdi), %zmm0 {%k1} {z} +;CHECK: ret +define <16 x float> @_ss16xfloat_maskz_load(float* %a.ptr, <16 x i32> %mask1) { + %a = load float* %a.ptr + %mask = icmp ne <16 x i32> %mask1, zeroinitializer + %b = insertelement <16 x float> undef, float %a, i32 0 + %c = shufflevector <16 x float> %b, <16 x float> undef, <16 x i32> zeroinitializer + %r = select <16 x i1> %mask, <16 x float> %c, <16 x float> zeroinitializer + ret <16 x float> %r +} + define <8 x double> @_inreg8xdouble(double %a) { ; CHECK-LABEL: _inreg8xdouble: ; CHECK: ## BB#0: @@ -40,6 +104,62 @@ define <8 x double> @_inreg8xdouble(double %a) { ret <8 x double> %c } +;CHECK-LABEL: _sd8xdouble_mask: +;CHECK: vbroadcastsd %xmm0, %zmm1 {%k1} +;CHECK: ret +define <8 x double> @_sd8xdouble_mask(double %a, <8 x double> %i, <8 x i32> %mask1) { + %mask = icmp ne <8 x i32> %mask1, zeroinitializer + %b = insertelement <8 x double> undef, double %a, i32 0 + %c = shufflevector <8 x double> %b, <8 x double> undef, <8 x i32> zeroinitializer + %r = select <8 x i1> %mask, <8 x double> %c, <8 x double> %i + ret <8 x double> %r +} + +;CHECK-LABEL: _sd8xdouble_maskz: +;CHECK: vbroadcastsd %xmm0, %zmm0 {%k1} {z} +;CHECK: ret +define <8 x double> @_sd8xdouble_maskz(double %a, <8 x i32> %mask1) { + %mask = icmp ne <8 x i32> %mask1, zeroinitializer + %b = insertelement <8 x double> undef, double %a, i32 0 + %c = shufflevector <8 x double> %b, <8 x double> undef, <8 x i32> zeroinitializer + %r = select <8 x i1> %mask, <8 x double> %c, <8 x double> zeroinitializer + ret <8 x double> %r +} + +;CHECK-LABEL: _sd8xdouble_load: +;CHECK: vbroadcastsd (%rdi), %zmm +;CHECK: ret +define <8 x double> @_sd8xdouble_load(double* %a.ptr) { + %a = load double* %a.ptr + %b = insertelement <8 x double> undef, double %a, i32 0 + %c = shufflevector <8 x double> %b, <8 x double> undef, <8 x i32> zeroinitializer + ret <8 x double> %c +} + +;CHECK-LABEL: _sd8xdouble_mask_load: +;CHECK: vbroadcastsd (%rdi), %zmm0 {%k1} +;CHECK: ret +define <8 x double> @_sd8xdouble_mask_load(double* %a.ptr, <8 x double> %i, <8 x i32> %mask1) { + %a = load double* %a.ptr + %mask = icmp ne <8 x i32> %mask1, zeroinitializer + %b = insertelement <8 x double> undef, double %a, i32 0 + %c = shufflevector <8 x double> %b, <8 x double> undef, <8 x i32> zeroinitializer + %r = select <8 x i1> %mask, <8 x double> %c, <8 x double> %i + ret <8 x double> %r +} + +define <8 x double> @_sd8xdouble_maskz_load(double* %a.ptr, <8 x i32> %mask1) { +; CHECK-LABEL: _sd8xdouble_maskz_load: +; CHECK: vbroadcastsd (%rdi), %zmm0 {%k1} {z} +; CHECK: ret + %a = load double* %a.ptr + %mask = icmp ne <8 x i32> %mask1, zeroinitializer + %b = insertelement <8 x double> undef, double %a, i32 0 + %c = shufflevector <8 x double> %b, <8 x double> undef, <8 x i32> zeroinitializer + %r = select <8 x i1> %mask, <8 x double> %c, <8 x double> zeroinitializer + ret <8 x double> %r +} + define <16 x i32> @_xmm16xi32(<16 x i32> %a) { ; CHECK-LABEL: _xmm16xi32: ; CHECK: ## BB#0: |