diff options
| author | Chad Rosier <mcrosier@apple.com> | 2012-03-20 17:08:51 +0000 |
|---|---|---|
| committer | Chad Rosier <mcrosier@apple.com> | 2012-03-20 17:08:51 +0000 |
| commit | 07a4cb9382e5ee48eb6d64ea69ae384f4f865cd9 (patch) | |
| tree | ed8defd7ec02c9691131e1ef4f5cb037d60f5632 /llvm/test | |
| parent | f8df4f4e3b90470f4385dd230dcedf83f326be3a (diff) | |
| download | bcm5719-llvm-07a4cb9382e5ee48eb6d64ea69ae384f4f865cd9.tar.gz bcm5719-llvm-07a4cb9382e5ee48eb6d64ea69ae384f4f865cd9.zip | |
[avx] Adjust the VINSERTF128rm pattern to allow for unaligned loads.
This results in things such as
vmovups 16(%rdi), %xmm0
vinsertf128 $1, %xmm0, %ymm0, %ymm0
to be combined to
vinsertf128 $1, 16(%rdi), %ymm0, %ymm0
rdar://11076953
llvm-svn: 153092
Diffstat (limited to 'llvm/test')
| -rw-r--r-- | llvm/test/CodeGen/X86/avx-vinsertf128.ll | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/llvm/test/CodeGen/X86/avx-vinsertf128.ll b/llvm/test/CodeGen/X86/avx-vinsertf128.ll index 9934a330413..3e86a2ae5ea 100644 --- a/llvm/test/CodeGen/X86/avx-vinsertf128.ll +++ b/llvm/test/CodeGen/X86/avx-vinsertf128.ll @@ -116,3 +116,16 @@ entry: %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 } + +rdar://11076953 +; CHECK: vinsertf128_ucombine +define <8 x float> @vinsertf128_ucombine(float* nocapture %f) nounwind uwtable readonly ssp { +; CHECK-NOT: vmovups +; 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 8 + %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 +} |

