xref: /llvm-project/llvm/test/CodeGen/VE/Vector/expand_single_elem_build_vec.ll (revision 5240e0b891fc4bf69d362199f70c94c28a7b9465)
1; RUN: llc < %s -mtriple=ve -mattr=+vpu | FileCheck %s
2
3; Function Attrs: norecurse nounwind readnone
4; Check that a single-element insertion is lowered to a insert_vector_elt node for isel.
5define fastcc <256 x i32> @expand_single_elem_build_vec(i32 %x, i32 %y) {
6; CHECK-LABEL: expand_single_elem_build_vec:
7; CHECK:       # %bb.0:
8; CHECK-NEXT:    and %s0, %s0, (32)0
9; CHECK-NEXT:    lsv %v0(42), %s0
10; CHECK-NEXT:    b.l.t (, %s10)
11  %r = insertelement <256 x i32> undef, i32 %x, i32 42
12  ret <256 x i32> %r
13}
14