From 27e130f11ca41ef7e53e4911e131edec95a5fa97 Mon Sep 17 00:00:00 2001 From: Simon Pilgrim Date: Sat, 18 Jul 2015 15:56:33 +0000 Subject: [PATCH] Tidyup shufflevector calls - don't repeat inputs if you can avoid it. llvm-svn: 242609 --- llvm/test/CodeGen/X86/vec_fp_to_int.ll | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/llvm/test/CodeGen/X86/vec_fp_to_int.ll b/llvm/test/CodeGen/X86/vec_fp_to_int.ll index 521253c..8ec3bda 100644 --- a/llvm/test/CodeGen/X86/vec_fp_to_int.ll +++ b/llvm/test/CodeGen/X86/vec_fp_to_int.ll @@ -430,7 +430,7 @@ define <2 x i64> @fptosi_2f32_to_2i64(<4 x float> %a) { ; AVX-NEXT: vmovq %rax, %xmm0 ; AVX-NEXT: vpunpcklqdq {{.*#+}} xmm0 = xmm1[0],xmm0[0] ; AVX-NEXT: retq - %shuf = shufflevector <4 x float> %a, <4 x float> %a, <2 x i32> + %shuf = shufflevector <4 x float> %a, <4 x float> undef, <2 x i32> %cvt = fptosi <2 x float> %shuf to <2 x i64> ret <2 x i64> %cvt } @@ -488,7 +488,7 @@ define <4 x i64> @fptosi_4f32_to_4i64(<8 x float> %a) { ; AVX-NEXT: vpunpcklqdq {{.*#+}} xmm0 = xmm2[0],xmm0[0] ; AVX-NEXT: vinsertf128 $1, %xmm1, %ymm0, %ymm0 ; AVX-NEXT: retq - %shuf = shufflevector <8 x float> %a, <8 x float> %a, <4 x i32> + %shuf = shufflevector <8 x float> %a, <8 x float> undef, <4 x i32> %cvt = fptosi <4 x float> %shuf to <4 x i64> ret <4 x i64> %cvt } @@ -584,7 +584,7 @@ define <2 x i64> @fptoui_2f32_to_2i64(<4 x float> %a) { ; AVX-NEXT: vmovq %rcx, %xmm0 ; AVX-NEXT: vpunpcklqdq {{.*#+}} xmm0 = xmm2[0],xmm0[0] ; AVX-NEXT: retq - %shuf = shufflevector <4 x float> %a, <4 x float> %a, <2 x i32> + %shuf = shufflevector <4 x float> %a, <4 x float> undef, <2 x i32> %cvt = fptoui <2 x float> %shuf to <2 x i64> ret <2 x i64> %cvt } @@ -744,7 +744,7 @@ define <4 x i64> @fptoui_4f32_to_4i64(<8 x float> %a) { ; AVX-NEXT: vpunpcklqdq {{.*#+}} xmm0 = xmm3[0],xmm0[0] ; AVX-NEXT: vinsertf128 $1, %xmm2, %ymm0, %ymm0 ; AVX-NEXT: retq - %shuf = shufflevector <8 x float> %a, <8 x float> %a, <4 x i32> + %shuf = shufflevector <8 x float> %a, <8 x float> undef, <4 x i32> %cvt = fptoui <4 x float> %shuf to <4 x i64> ret <4 x i64> %cvt } -- 2.7.4