From 3ab21de299f5030164956850162cb10808e4be43 Mon Sep 17 00:00:00 2001 From: Simon Pilgrim Date: Fri, 28 Apr 2017 10:31:42 +0000 Subject: [PATCH] [X86][SSE] Add codegen test for _mm_set_pd1 (PR32827) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@301638 91177308-0d34-0410-b5e6-96231b3b80d8 --- test/CodeGen/X86/sse2-intrinsics-fast-isel.ll | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/test/CodeGen/X86/sse2-intrinsics-fast-isel.ll b/test/CodeGen/X86/sse2-intrinsics-fast-isel.ll index 964037ea80a..20387ccd6b7 100644 --- a/test/CodeGen/X86/sse2-intrinsics-fast-isel.ll +++ b/test/CodeGen/X86/sse2-intrinsics-fast-isel.ll @@ -2318,6 +2318,22 @@ define <2 x double> @test_mm_set_pd(double %a0, double %a1) nounwind { ret <2 x double> %res1 } +define <2 x double> @test_mm_set_pd1(double %a0) nounwind { +; X32-LABEL: test_mm_set_pd1: +; X32: # BB#0: +; X32-NEXT: movsd {{.*#+}} xmm0 = mem[0],zero +; X32-NEXT: movlhps {{.*#+}} xmm0 = xmm0[0,0] +; X32-NEXT: retl +; +; X64-LABEL: test_mm_set_pd1: +; X64: # BB#0: +; X64-NEXT: movlhps {{.*#+}} xmm0 = xmm0[0,0] +; X64-NEXT: retq + %res0 = insertelement <2 x double> undef, double %a0, i32 0 + %res1 = insertelement <2 x double> %res0, double %a0, i32 1 + ret <2 x double> %res1 +} + define <2 x double> @test_mm_set_sd(double %a0) nounwind { ; X32-LABEL: test_mm_set_sd: ; X32: # BB#0: -- 2.11.0