blob: 576eb7a24393861fa354aae30f438ad15f5ac6b5 [file] [log] [blame]
Silviu Barangadc453362013-03-27 12:38:44 +00001; RUN: llc -O1 -mcpu=cortex-a15 -mtriple=armv7-linux-gnueabi -verify-machineinstrs < %s | FileCheck %s
2
Stephen Lind24ab202013-07-14 06:24:09 +00003; CHECK-LABEL: t1:
Silviu Barangadc453362013-03-27 12:38:44 +00004define <2 x float> @t1(float* %A, <2 x float> %B) {
5; The generated code for this test uses a vld1.32 instruction
6; to write the lane 1 of a D register containing the value of
7; <2 x float> %B. Since the D register is defined, it would
8; be incorrect to fully write it (with a vmov.f64) before the
9; vld1.32 instruction. The test checks that a vmov.f64 was not
10; generated.
11
12; CHECK-NOT: vmov.{{.*}} d{{[0-9]+}},
David Blaikiea79ac142015-02-27 21:17:42 +000013 %tmp2 = load float, float* %A, align 4
Silviu Barangadc453362013-03-27 12:38:44 +000014 %tmp3 = insertelement <2 x float> %B, float %tmp2, i32 1
15 ret <2 x float> %tmp3
16}
17
Stephen Lind24ab202013-07-14 06:24:09 +000018; CHECK-LABEL: t2:
Silviu Barangadc453362013-03-27 12:38:44 +000019define void @t2(<4 x i8> *%in, <4 x i8> *%out, i32 %n) {
20entry:
21 br label %loop
22loop:
23; The code generated by this test uses a vld1.32 instruction.
24; We check that a dependency breaking vmov* instruction was
25; generated.
26
27; CHECK: vmov.{{.*}} d{{[0-9]+}},
28 %oldcount = phi i32 [0, %entry], [%newcount, %loop]
29 %newcount = add i32 %oldcount, 1
David Blaikie79e6c742015-02-27 19:29:02 +000030 %p1 = getelementptr <4 x i8>, <4 x i8> *%in, i32 %newcount
31 %p2 = getelementptr <4 x i8>, <4 x i8> *%out, i32 %newcount
David Blaikiea79ac142015-02-27 21:17:42 +000032 %tmp1 = load <4 x i8> , <4 x i8> *%p1, align 4
Silviu Barangadc453362013-03-27 12:38:44 +000033 store <4 x i8> %tmp1, <4 x i8> *%p2
34 %cmp = icmp eq i32 %newcount, %n
35 br i1 %cmp, label %loop, label %ret
36ret:
37 ret void
38}