[llvm] r274884 - [X86][AVX] Added combine test that should simplify to insertps
Simon Pilgrim via llvm-commits
llvm-commits at lists.llvm.org
Fri Jul 8 10:01:42 PDT 2016
Author: rksimon
Date: Fri Jul 8 12:01:42 2016
New Revision: 274884
URL: http://llvm.org/viewvc/llvm-project?rev=274884&view=rev
Log:
[X86][AVX] Added combine test that should simplify to insertps
Modified:
llvm/trunk/test/CodeGen/X86/vector-shuffle-combining-avx.ll
Modified: llvm/trunk/test/CodeGen/X86/vector-shuffle-combining-avx.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/vector-shuffle-combining-avx.ll?rev=274884&r1=274883&r2=274884&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/X86/vector-shuffle-combining-avx.ll (original)
+++ llvm/trunk/test/CodeGen/X86/vector-shuffle-combining-avx.ll Fri Jul 8 12:01:42 2016
@@ -186,3 +186,13 @@ define <8 x float> @combine_vpermilvar_8
%4 = tail call <8 x float> @llvm.x86.avx.vpermilvar.ps.256(<8 x float> %3, <8 x i32> <i32 3, i32 2, i32 1, i32 0, i32 3, i32 2, i32 1, i32 0>)
ret <8 x float> %4
}
+
+define <4 x float> @combine_vpermilvar_4f32_as_insertps(<4 x float> %a0) {
+; ALL-LABEL: combine_vpermilvar_4f32_as_insertps:
+; ALL: # BB#0:
+; ALL-NEXT: vpshufb {{.*#+}} xmm0 = xmm0[4,5,6,7],zero,zero,zero,zero,xmm0[8,9,10,11],zero,zero,zero,zero
+; ALL-NEXT: retq
+ %1 = call <4 x float> @llvm.x86.avx.vpermilvar.ps(<4 x float> %a0, <4 x i32> <i32 3, i32 2, i32 1, i32 0>)
+ %2 = shufflevector <4 x float> %1, <4 x float> zeroinitializer, <4 x i32> <i32 2, i32 4, i32 1, i32 4>
+ ret <4 x float> %2
+}
More information about the llvm-commits
mailing list