From b210651654e64bec5eb14214a61da52c451a4044 Mon Sep 17 00:00:00 2001 From: Nadav Rotem Date: Thu, 10 May 2012 12:39:13 +0000 Subject: AVX2: Add an additional broadcast idiom. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@156540 91177308-0d34-0410-b5e6-96231b3b80d8 --- test/CodeGen/X86/avx-vbroadcast.ll | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'test/CodeGen/X86/avx-vbroadcast.ll') diff --git a/test/CodeGen/X86/avx-vbroadcast.ll b/test/CodeGen/X86/avx-vbroadcast.ll index 26ee1d33a1..0d403d4bb1 100644 --- a/test/CodeGen/X86/avx-vbroadcast.ll +++ b/test/CodeGen/X86/avx-vbroadcast.ll @@ -129,3 +129,15 @@ entry: ret <4 x float> %vecinit6.i } + +; CHECK: _RR2 +; CHECK: vbroadcastss (% +; CHECK: ret +define <4 x float> @_RR2(float* %ptr, i32* %k) nounwind uwtable readnone ssp { +entry: + %q = load float* %ptr, align 4 + %v = insertelement <4 x float> undef, float %q, i32 0 + %t = shufflevector <4 x float> %v, <4 x float> undef, <4 x i32> zeroinitializer + ret <4 x float> %t +} + -- cgit v1.2.3