diff options
author | Chad Rosier <mcrosier@apple.com> | 2012-03-15 00:45:30 +0000 |
---|---|---|
committer | Chad Rosier <mcrosier@apple.com> | 2012-03-15 00:45:30 +0000 |
commit | 38ca0d78a2b3bb23d3121613b0781023fa9cd2a8 (patch) | |
tree | 8e99841b9f6f135f2a6ac8c6f59a4d7cae18774d /test/CodeGen | |
parent | ae029098a5861e451b77969627f11a4ef3342a76 (diff) | |
download | external_llvm-38ca0d78a2b3bb23d3121613b0781023fa9cd2a8.zip external_llvm-38ca0d78a2b3bb23d3121613b0781023fa9cd2a8.tar.gz external_llvm-38ca0d78a2b3bb23d3121613b0781023fa9cd2a8.tar.bz2 |
[avx] Add patterns for VINSERTF128rm.
This results in things such as
vmovaps -96(%rbx), %xmm1
vinsertf128 $1, %xmm1, %ymm0, %ymm0
to be combined to
vinsertf128 $1, -96(%rbx), %ymm0, %ymm0
rdar://10643481
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152762 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGen')
-rw-r--r-- | test/CodeGen/X86/avx-vinsertf128.ll | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/test/CodeGen/X86/avx-vinsertf128.ll b/test/CodeGen/X86/avx-vinsertf128.ll index def2212..9934a33 100644 --- a/test/CodeGen/X86/avx-vinsertf128.ll +++ b/test/CodeGen/X86/avx-vinsertf128.ll @@ -104,3 +104,15 @@ ret <8 x i32> %res } declare <8 x i32> @llvm.x86.avx.vinsertf128.si.256(<8 x i32>, <4 x i32>, i8) nounwind readnone +; rdar://10643481 +; CHECK: vinsertf128_combine +define <8 x float> @vinsertf128_combine(float* nocapture %f) nounwind uwtable readonly ssp { +; CHECK-NOT: vmovaps +; CHECK: vinsertf128 +entry: + %add.ptr = getelementptr inbounds float* %f, i64 4 + %0 = bitcast float* %add.ptr to <4 x float>* + %1 = load <4 x float>* %0, align 16 + %2 = tail call <8 x float> @llvm.x86.avx.vinsertf128.ps.256(<8 x float> undef, <4 x float> %1, i8 1) + ret <8 x float> %2 +} |