blob: b5a2aa80ce1667e5672c1ca6fdc8ac0394a3748b [file] [log] [blame]
Elena Demikhovskyf8f478b2013-08-25 12:54:30 +00001; RUN: llc < %s -march=x86-64 -mtriple=x86_64-apple-darwin -mcpu=knl | FileCheck %s
2
3; CHECK-LABEL: test1
4; CHECK: vpxord
5; CHECK: ret
6define <16 x i32> @test1(i32* %x) {
7 %y = load i32* %x, align 4
8 %res = insertelement <16 x i32>zeroinitializer, i32 %y, i32 4
9 ret <16 x i32>%res
10}
11
12; CHECK-LABEL: test2
13; CHECK: vpaddd LCP{{.*}}(%rip){1to16}
14; CHECK: ret
15define <16 x i32> @test2(<16 x i32> %x) {
16 %res = add <16 x i32><i32 -1, i32 -1, i32 -1, i32 -1, i32 -1, i32 -1, i32 -1, i32 -1, i32 -1, i32 -1, i32 -1, i32 -1, i32 -1, i32 -1, i32 -1, i32 -1>, %x
17 ret <16 x i32>%res
Elena Demikhovsky2aafc222014-02-11 07:25:59 +000018}
19
20; CHECK-LABEL: test3
21; CHECK: vinsertf128
22; CHECK: vinsertf64x4
23; CHECK: ret
24define <16 x float> @test3(<4 x float> %a) {
25 %b = extractelement <4 x float> %a, i32 2
26 %c = insertelement <16 x float> <float 0.000000e+00, float 0.000000e+00, float 0.000000e+00, float 0.000000e+00, float 0.000000e+00, float undef, float 0.000000e+00, float 0.000000e+00, float 0.000000e+00, float 0.000000e+00, float 0.000000e+00, float 0.000000e+00, float 0.000000e+00, float 0.000000e+00, float 0.000000e+00, float 0.000000e+00>, float %b, i32 5
27 %b1 = extractelement <4 x float> %a, i32 0
28 %c1 = insertelement <16 x float> %c, float %b1, i32 6
29 ret <16 x float>%c1
Elena Demikhovskyf8f478b2013-08-25 12:54:30 +000030}