1 ; RUN: llc -march=hexagon < %s | FileCheck %s
3 ; Check that vector is produced with vxor
4 ; CHECK: v{{[0-9]*}} = vxor
5 define <32 x i32> @f0(i32 %x) #0 {
6 %vect = insertelement <32 x i32> <i32 undef, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0>, i32 %x, i32 0
10 ; Check that vector is produced with vsplat
11 ; CHECK: v{{[0-9]*}} = vsplat
12 define <32 x i32> @f1(i32 %x) #0 {
13 %vect = insertelement <32 x i32> <i32 undef, 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, 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 %x, i32 0
17 ; Check that the correct vror is generated
18 ; CHECK: [[REG0:r([0-9]+)]] = #120
19 ; CHECK: vror(v{{[0-9]+}},[[REG0]])
20 define <32 x i32> @f2(i32 %x) #0 {
21 %vect = insertelement <32 x i32> <i32 1, i32 1, i32 undef, 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, 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 %x, i32 2
25 ; Check that the correct vror is generated
26 ; CHECK: [[REG0:r([0-9]+)]] = #12
27 ; CHECK: vror(v{{[0-9]+}},[[REG0]])
28 define <32 x i32> @f3(i32 %x) #0 {
29 %vect = insertelement <32 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, 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 undef, i32 1, i32 1>, i32 %x, i32 29
33 attributes #0 = { readnone nounwind "target-cpu"="hexagonv62" "target-features"="+hvx,+hvx-length128b" }