[llvm] r322175 - [X86][SSE] Add v2f64 u2 shuffle test
Simon Pilgrim via llvm-commits
llvm-commits at lists.llvm.org
Wed Jan 10 04:23:39 PST 2018
Author: rksimon
Date: Wed Jan 10 04:23:39 2018
New Revision: 322175
URL: http://llvm.org/viewvc/llvm-project?rev=322175&view=rev
Log:
[X86][SSE] Add v2f64 u2 shuffle test
Adds missing coverage for SHUFPD undef argument lowering, and also shows a missed opportunity to remove a unnecessary move compared to 02 shuffle mask.
Modified:
llvm/trunk/test/CodeGen/X86/vector-shuffle-128-v2.ll
Modified: llvm/trunk/test/CodeGen/X86/vector-shuffle-128-v2.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/vector-shuffle-128-v2.ll?rev=322175&r1=322174&r2=322175&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/X86/vector-shuffle-128-v2.ll (original)
+++ llvm/trunk/test/CodeGen/X86/vector-shuffle-128-v2.ll Wed Jan 10 04:23:39 2018
@@ -298,7 +298,35 @@ define <2 x double> @shuffle_v2f64_21(<2
%shuffle = shufflevector <2 x double> %a, <2 x double> %b, <2 x i32> <i32 2, i32 1>
ret <2 x double> %shuffle
}
-
+define <2 x double> @shuffle_v2f64_u2(<2 x double> %a, <2 x double> %b) {
+; SSE2-LABEL: shuffle_v2f64_u2:
+; SSE2: # %bb.0:
+; SSE2-NEXT: movlhps {{.*#+}} xmm1 = xmm1[0,0]
+; SSE2-NEXT: movaps %xmm1, %xmm0
+; SSE2-NEXT: retq
+;
+; SSE3-LABEL: shuffle_v2f64_u2:
+; SSE3: # %bb.0:
+; SSE3-NEXT: movddup {{.*#+}} xmm0 = xmm1[0,0]
+; SSE3-NEXT: retq
+;
+; SSSE3-LABEL: shuffle_v2f64_u2:
+; SSSE3: # %bb.0:
+; SSSE3-NEXT: movddup {{.*#+}} xmm0 = xmm1[0,0]
+; SSSE3-NEXT: retq
+;
+; SSE41-LABEL: shuffle_v2f64_u2:
+; SSE41: # %bb.0:
+; SSE41-NEXT: movddup {{.*#+}} xmm0 = xmm1[0,0]
+; SSE41-NEXT: retq
+;
+; AVX-LABEL: shuffle_v2f64_u2:
+; AVX: # %bb.0:
+; AVX-NEXT: vmovddup {{.*#+}} xmm0 = xmm1[0,0]
+; AVX-NEXT: retq
+ %shuffle = shufflevector <2 x double> %a, <2 x double> %b, <2 x i32> <i32 undef, i32 2>
+ ret <2 x double> %shuffle
+}
define <2 x i64> @shuffle_v2i64_02(<2 x i64> %a, <2 x i64> %b) {
; SSE-LABEL: shuffle_v2i64_02:
More information about the llvm-commits
mailing list