[llvm] r310317 - [X86][AVX] Added test for broadcast shuffle from binary sources with undefs (D36393)
Simon Pilgrim via llvm-commits
llvm-commits at lists.llvm.org
Mon Aug 7 15:20:06 PDT 2017
Author: rksimon
Date: Mon Aug 7 15:20:06 2017
New Revision: 310317
URL: http://llvm.org/viewvc/llvm-project?rev=310317&view=rev
Log:
[X86][AVX] Added test for broadcast shuffle from binary sources with undefs (D36393)
Modified:
llvm/trunk/test/CodeGen/X86/avx-vbroadcast.ll
Modified: llvm/trunk/test/CodeGen/X86/avx-vbroadcast.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/avx-vbroadcast.ll?rev=310317&r1=310316&r2=310317&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/X86/avx-vbroadcast.ll (original)
+++ llvm/trunk/test/CodeGen/X86/avx-vbroadcast.ll Mon Aug 7 15:20:06 2017
@@ -851,6 +851,30 @@ define <4 x double> @broadcast_shuffle_1
ret <4 x double> %3
}
+define <4 x double> @broadcast_shuffle1032(double* %p) {
+; X32-LABEL: broadcast_shuffle1032:
+; X32: ## BB#0:
+; X32-NEXT: movl {{[0-9]+}}(%esp), %eax
+; X32-NEXT: vmovsd {{.*#+}} xmm0 = mem[0],zero
+; X32-NEXT: vmovddup {{.*#+}} xmm1 = xmm0[0,0]
+; X32-NEXT: vinsertf128 $1, %xmm0, %ymm1, %ymm0
+; X32-NEXT: vpermilpd {{.*#+}} ymm0 = ymm0[1,0,3,2]
+; X32-NEXT: retl
+;
+; X64-LABEL: broadcast_shuffle1032:
+; X64: ## BB#0:
+; X64-NEXT: vmovsd {{.*#+}} xmm0 = mem[0],zero
+; X64-NEXT: vmovddup {{.*#+}} xmm1 = xmm0[0,0]
+; X64-NEXT: vinsertf128 $1, %xmm0, %ymm1, %ymm0
+; X64-NEXT: vpermilpd {{.*#+}} ymm0 = ymm0[1,0,3,2]
+; X64-NEXT: retq
+ %1 = load double, double* %p
+ %2 = insertelement <2 x double> undef, double %1, i32 1
+ %3 = insertelement <2 x double> undef, double %1, i32 0
+ %4 = shufflevector <2 x double> %2, <2 x double> %3, <4 x i32> <i32 1, i32 0, i32 3, i32 2>
+ ret <4 x double> %4
+}
+
;
; When VBROADCAST replaces an existing load, ensure it still respects lifetime dependencies.
;
More information about the llvm-commits
mailing list