diff options
author | Akira Hatanaka <ahatanaka@apple.com> | 2014-09-25 00:26:15 +0000 |
---|---|---|
committer | Akira Hatanaka <ahatanaka@apple.com> | 2014-09-25 00:26:15 +0000 |
commit | 8cc48bd159b0fb52c346e90c381ae96d5a59f72c (patch) | |
tree | 4167fbf951c6e62def9f3c3b2f28de9883c256fe /llvm/test | |
parent | 98443d89b964b3b9a7a3c61d4dd5f3194a5604b6 (diff) | |
download | bcm5719-llvm-8cc48bd159b0fb52c346e90c381ae96d5a59f72c.tar.gz bcm5719-llvm-8cc48bd159b0fb52c346e90c381ae96d5a59f72c.zip |
[X86,AVX] Add an isel pattern for X86VBroadcast.
This fixes PR21050 and rdar://problem/18434607.
llvm-svn: 218431
Diffstat (limited to 'llvm/test')
-rw-r--r-- | llvm/test/CodeGen/X86/avx-movdup.ll | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/llvm/test/CodeGen/X86/avx-movdup.ll b/llvm/test/CodeGen/X86/avx-movdup.ll index 42d84def98a..19a03259378 100644 --- a/llvm/test/CodeGen/X86/avx-movdup.ll +++ b/llvm/test/CodeGen/X86/avx-movdup.ll @@ -32,3 +32,22 @@ entry: ret <4 x i64> %1 } +; Check that there is a pattern (v2f64 (X86VBroadcast f64:$src)). + +; CHECK-LABEL: _vbroadcast_v128_f64 +; CHECK: vmovsd LCPI{{[0-9]+}}_0(%rip), %xmm[[R0:[0-9]+]] +; CHECK: vmovddup %xmm[[R0]], %xmm{{[0-9]+}} + +@E1 = external global [5 x double], align 16 +@.str3 = external unnamed_addr constant [44 x i8], align 1 + +define void @vbroadcast_v128_f64() #0 { +entry: + store <2 x double> <double -1.000000e+00, double -1.000000e+00>, <2 x double>* bitcast (double* getelementptr inbounds ([5 x double]* @E1, i64 0, i64 2) to <2 x double>*), align 16 + tail call void @foo1(double -1.000000e+00) + ret void +} + +declare void @foo1(double) + +attributes #0 = { optsize } |