summaryrefslogtreecommitdiff
path: root/test/CodeGen/X86/avx2-vbroadcast.ll
diff options
context:
space:
mode:
authorNadav Rotem <nadav.rotem@intel.com>2012-05-19 19:57:37 +0000
committerNadav Rotem <nadav.rotem@intel.com>2012-05-19 19:57:37 +0000
commit4fc8a5de44c2fc3ce82d5467bd96dfe25aa3a0e9 (patch)
tree6896106d3b170a2ffc5fc709e13c948a05aa7f9a /test/CodeGen/X86/avx2-vbroadcast.ll
parent9e7e04823cb472ae8c36ce354365ba76ba1bcb36 (diff)
downloadllvm-4fc8a5de44c2fc3ce82d5467bd96dfe25aa3a0e9.tar.gz
llvm-4fc8a5de44c2fc3ce82d5467bd96dfe25aa3a0e9.tar.bz2
llvm-4fc8a5de44c2fc3ce82d5467bd96dfe25aa3a0e9.tar.xz
Add support for additional in-reg vbroadcast patterns
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@157127 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGen/X86/avx2-vbroadcast.ll')
-rw-r--r--test/CodeGen/X86/avx2-vbroadcast.ll37
1 files changed, 37 insertions, 0 deletions
diff --git a/test/CodeGen/X86/avx2-vbroadcast.ll b/test/CodeGen/X86/avx2-vbroadcast.ll
index 6eba694bd4..46b41fa953 100644
--- a/test/CodeGen/X86/avx2-vbroadcast.ll
+++ b/test/CodeGen/X86/avx2-vbroadcast.ll
@@ -222,3 +222,40 @@ footer349VF:
ret:
ret void
}
+
+; CHECK: _inreg0
+; CHECK: broadcastss
+; CHECK: ret
+define <8 x i32> @_inreg0(i32 %scalar) nounwind uwtable readnone ssp {
+ %in = insertelement <8 x i32> undef, i32 %scalar, i32 0
+ %wide = shufflevector <8 x i32> %in, <8 x i32> undef, <8 x i32> zeroinitializer
+ ret <8 x i32> %wide
+}
+
+; CHECK: _inreg1
+; CHECK: broadcastss
+; CHECK: ret
+define <8 x float> @_inreg1(float %scalar) nounwind uwtable readnone ssp {
+ %in = insertelement <8 x float> undef, float %scalar, i32 0
+ %wide = shufflevector <8 x float> %in, <8 x float> undef, <8 x i32> zeroinitializer
+ ret <8 x float> %wide
+}
+
+; CHECK: _inreg2
+; CHECK: broadcastss
+; CHECK: ret
+define <4 x float> @_inreg2(float %scalar) nounwind uwtable readnone ssp {
+ %in = insertelement <4 x float> undef, float %scalar, i32 0
+ %wide = shufflevector <4 x float> %in, <4 x float> undef, <4 x i32> zeroinitializer
+ ret <4 x float> %wide
+}
+
+; CHECK: _inreg3
+; CHECK: broadcastsd
+; CHECK: ret
+define <4 x double> @_inreg3(double %scalar) nounwind uwtable readnone ssp {
+ %in = insertelement <4 x double> undef, double %scalar, i32 0
+ %wide = shufflevector <4 x double> %in, <4 x double> undef, <4 x i32> zeroinitializer
+ ret <4 x double> %wide
+}
+