[llvm] r322458 - [X86][SSE] Add v2f64 3u shuffle test
Simon Pilgrim via llvm-commits
llvm-commits at lists.llvm.org
Sun Jan 14 10:38:21 PST 2018
Author: rksimon
Date: Sun Jan 14 10:38:21 2018
New Revision: 322458
URL: http://llvm.org/viewvc/llvm-project?rev=322458&view=rev
Log:
[X86][SSE] Add v2f64 3u shuffle test
Shows a missed opportunity to remove a unnecessary move compared to 31 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=322458&r1=322457&r2=322458&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/X86/vector-shuffle-128-v2.ll (original)
+++ llvm/trunk/test/CodeGen/X86/vector-shuffle-128-v2.ll Sun Jan 14 10:38:21 2018
@@ -327,6 +327,20 @@ define <2 x double> @shuffle_v2f64_u2(<2
%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 double> @shuffle_v2f64_3u(<2 x double> %a, <2 x double> %b) {
+; SSE-LABEL: shuffle_v2f64_3u:
+; SSE: # %bb.0:
+; SSE-NEXT: movhlps {{.*#+}} xmm1 = xmm1[1,1]
+; SSE-NEXT: movaps %xmm1, %xmm0
+; SSE-NEXT: retq
+;
+; AVX-LABEL: shuffle_v2f64_3u:
+; AVX: # %bb.0:
+; AVX-NEXT: vpermilpd {{.*#+}} xmm0 = xmm1[1,0]
+; AVX-NEXT: retq
+ %shuffle = shufflevector <2 x double> %a, <2 x double> %b, <2 x i32> <i32 3, i32 undef>
+ 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