summaryrefslogtreecommitdiffstats
path: root/llvm/test/CodeGen/X86/avx-vbroadcast.ll
diff options
context:
space:
mode:
authorSimon Pilgrim <llvm-dev@redking.me.uk>2017-10-23 15:48:08 +0000
committerSimon Pilgrim <llvm-dev@redking.me.uk>2017-10-23 15:48:08 +0000
commit32da2f9245f259fc437129ec9894e664b64ad0d4 (patch)
tree6c5c61a606556bf63be0159baeb91962eb79688c /llvm/test/CodeGen/X86/avx-vbroadcast.ll
parentf9cb007355de70b6e8204156fdcfaf886dbed316 (diff)
downloadbcm5719-llvm-32da2f9245f259fc437129ec9894e664b64ad0d4.tar.gz
bcm5719-llvm-32da2f9245f259fc437129ec9894e664b64ad0d4.zip
[DAGCombine] Permit combining of shuffles of equivalent splat BUILD_VECTORs
combineShuffleOfScalars is very conservative about shuffled BUILD_VECTORs that can be combined together. This patch adds one additional case - if both BUILD_VECTORs represent splats of the same scalar value but with different UNDEF elements, then we should create a single splat BUILD_VECTOR, sharing only the UNDEF elements defined by the shuffle mask. Differential Revision: https://reviews.llvm.org/D38696 llvm-svn: 316331
Diffstat (limited to 'llvm/test/CodeGen/X86/avx-vbroadcast.ll')
-rw-r--r--llvm/test/CodeGen/X86/avx-vbroadcast.ll6
1 files changed, 2 insertions, 4 deletions
diff --git a/llvm/test/CodeGen/X86/avx-vbroadcast.ll b/llvm/test/CodeGen/X86/avx-vbroadcast.ll
index 65e856c03c8..5dcc5a70529 100644
--- a/llvm/test/CodeGen/X86/avx-vbroadcast.ll
+++ b/llvm/test/CodeGen/X86/avx-vbroadcast.ll
@@ -853,14 +853,12 @@ define <4 x double> @broadcast_shuffle1032(double* %p) {
; X32-LABEL: broadcast_shuffle1032:
; X32: ## BB#0:
; X32-NEXT: movl {{[0-9]+}}(%esp), %eax
-; X32-NEXT: vmovddup {{.*#+}} xmm0 = mem[0,0]
-; X32-NEXT: vinsertf128 $1, %xmm0, %ymm0, %ymm0
+; X32-NEXT: vbroadcastsd (%eax), %ymm0
; X32-NEXT: retl
;
; X64-LABEL: broadcast_shuffle1032:
; X64: ## BB#0:
-; X64-NEXT: vmovddup {{.*#+}} xmm0 = mem[0,0]
-; X64-NEXT: vinsertf128 $1, %xmm0, %ymm0, %ymm0
+; X64-NEXT: vbroadcastsd (%rdi), %ymm0
; X64-NEXT: retq
%1 = load double, double* %p
%2 = insertelement <2 x double> undef, double %1, i32 1
OpenPOWER on IntegriCloud