summaryrefslogtreecommitdiff
path: root/test/CodeGen/X86/avx-vbroadcast.ll
diff options
context:
space:
mode:
authorNadav Rotem <nadav.rotem@intel.com>2012-05-10 12:39:13 +0000
committerNadav Rotem <nadav.rotem@intel.com>2012-05-10 12:39:13 +0000
commitb210651654e64bec5eb14214a61da52c451a4044 (patch)
tree785df5e0fd42e793827e7ccf07ba63a5f84bfb2c /test/CodeGen/X86/avx-vbroadcast.ll
parent5fc2187a025bb77b9023239edf12868d833630fe (diff)
downloadllvm-b210651654e64bec5eb14214a61da52c451a4044.tar.gz
llvm-b210651654e64bec5eb14214a61da52c451a4044.tar.bz2
llvm-b210651654e64bec5eb14214a61da52c451a4044.tar.xz
AVX2: Add an additional broadcast idiom.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@156540 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGen/X86/avx-vbroadcast.ll')
-rw-r--r--test/CodeGen/X86/avx-vbroadcast.ll12
1 files changed, 12 insertions, 0 deletions
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
+}
+