diff options
| author | Simon Pilgrim <llvm-dev@redking.me.uk> | 2016-01-26 21:39:25 +0000 |
|---|---|---|
| committer | Simon Pilgrim <llvm-dev@redking.me.uk> | 2016-01-26 21:39:25 +0000 |
| commit | 00adc1e105734a2a3982191863cff482676cad7d (patch) | |
| tree | 219d099ffd3a31e8956441294b9d15a7e25527c2 /llvm/test | |
| parent | 2cc7fec76a0ad622f1fcdb5ffee93cf5d53c08ee (diff) | |
| download | bcm5719-llvm-00adc1e105734a2a3982191863cff482676cad7d.tar.gz bcm5719-llvm-00adc1e105734a2a3982191863cff482676cad7d.zip | |
[X86] Add support for zeroed shuffle elements to getShuffleScalarElt
Enable handling of SM_SentinelZero shuffle elements to getShuffleScalarElt. Improves VZEXT_LOAD matches in EltsFromConsecutiveLoads.
llvm-svn: 258865
Diffstat (limited to 'llvm/test')
| -rw-r--r-- | llvm/test/CodeGen/X86/insertps-combine.ll | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/llvm/test/CodeGen/X86/insertps-combine.ll b/llvm/test/CodeGen/X86/insertps-combine.ll index 54b5fe444ba..fa18ca60405 100644 --- a/llvm/test/CodeGen/X86/insertps-combine.ll +++ b/llvm/test/CodeGen/X86/insertps-combine.ll @@ -130,6 +130,26 @@ define <4 x float> @insertps_undef_input1(<4 x float> %a0, <4 x float> %a1) { ret <4 x float> %res2 } +define <4 x float> @consecutive_load_insertps_04zz(float* %p) { +; SSE-LABEL: consecutive_load_insertps_04zz: +; SSE: # BB#0: +; SSE-NEXT: movq {{.*#+}} xmm0 = mem[0],zero +; SSE-NEXT: retq +; +; AVX-LABEL: consecutive_load_insertps_04zz: +; AVX: # BB#0: +; AVX-NEXT: vmovq {{.*#+}} xmm0 = mem[0],zero +; AVX-NEXT: retq + %p0 = getelementptr inbounds float, float* %p, i64 1 + %p1 = getelementptr inbounds float, float* %p, i64 2 + %s0 = load float, float* %p0 + %s1 = load float, float* %p1 + %v0 = insertelement <4 x float> undef, float %s0, i32 0 + %v1 = insertelement <4 x float> undef, float %s1, i32 0 + %res = call <4 x float> @llvm.x86.sse41.insertps(<4 x float> %v0, <4 x float> %v1, i8 28) + ret <4 x float> %res +} + define float @extract_zero_insertps_z0z7(<4 x float> %a0, <4 x float> %a1) { ; SSE-LABEL: extract_zero_insertps_z0z7: ; SSE: # BB#0: |

