• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1; RUN: llc -mtriple=arm-eabi -mattr=+neon %s -o - | FileCheck %s
2
3; This test checks that when inserting one (integer) element into a vector,
4; the vector is not spuriously copied. "vorr dX, dY, dY" is the way of moving
5; one DPR to another that we check for.
6
7; CHECK: @f
8; CHECK-NOT: vorr d
9; CHECK: vmov.32 d
10; CHECK-NOT: vorr d
11; CHECK: mov pc, lr
12define <4 x i32> @f(<4 x i32> %in) {
13  %1 = insertelement <4 x i32> %in, i32 255, i32 3
14  ret <4 x i32> %1
15}
16
17; CHECK: @g
18; CHECK-NOT: vorr d
19; CHECK: vmov.16 d
20; CHECK-NOT: vorr d
21; CHECK: mov pc, lr
22define <8 x i16> @g(<8 x i16> %in) {
23  %1 = insertelement <8 x i16> %in, i16 255, i32 7
24  ret <8 x i16> %1
25}
26
27; CHECK: @h
28; CHECK-NOT: vorr d
29; CHECK: vmov.8 d
30; CHECK-NOT: vorr d
31; CHECK: mov pc, lr
32define <16 x i8> @h(<16 x i8> %in) {
33  %1 = insertelement <16 x i8> %in, i8 255, i32 15
34  ret <16 x i8> %1
35}
36