blob: bf403b92806bbb71c43567c30dc88786919e8332 [file] [log] [blame]
Saleem Abdulrasool72587352014-04-03 16:01:44 +00001; RUN: llc -mtriple=arm-eabi -mattr=+neon %s -o - | FileCheck %s
James Molloy34e99312012-09-06 09:16:01 +00002
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
Jakob Stoklund Olesen1f06e7f2012-10-26 23:39:46 +00009; CHECK: vmov.32 d
James Molloy34e99312012-09-06 09:16:01 +000010; 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}