bc4560b3f3fcaf3a93e718eac488b5ad5313a9fd
[oota-llvm.git] / test / CodeGen / X86 / avx512-build-vector.ll
1 ; 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
6 define <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
15 define <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
18 }