xref: /aosp_15_r20/external/llvm/test/CodeGen/ARM/a15-partial-update.ll (revision 9880d6810fe72a1726cb53787c6711e909410d58)
1*9880d681SAndroid Build Coastguard Worker; RUN: llc -O1 -mcpu=cortex-a15 -mtriple=armv7-linux-gnueabi -verify-machineinstrs < %s  | FileCheck %s
2*9880d681SAndroid Build Coastguard Worker
3*9880d681SAndroid Build Coastguard Worker; CHECK-LABEL: t1:
4*9880d681SAndroid Build Coastguard Workerdefine <2 x float> @t1(float* %A, <2 x float> %B) {
5*9880d681SAndroid Build Coastguard Worker; The generated code for this test uses a vld1.32 instruction
6*9880d681SAndroid Build Coastguard Worker; to write the lane 1 of a D register containing the value of
7*9880d681SAndroid Build Coastguard Worker; <2 x float> %B. Since the D register is defined, it would
8*9880d681SAndroid Build Coastguard Worker; be incorrect to fully write it (with a vmov.f64) before the
9*9880d681SAndroid Build Coastguard Worker; vld1.32 instruction. The test checks that a vmov.f64 was not
10*9880d681SAndroid Build Coastguard Worker; generated.
11*9880d681SAndroid Build Coastguard Worker
12*9880d681SAndroid Build Coastguard Worker; CHECK-NOT: vmov.{{.*}} d{{[0-9]+}},
13*9880d681SAndroid Build Coastguard Worker  %tmp2 = load float, float* %A, align 4
14*9880d681SAndroid Build Coastguard Worker  %tmp3 = insertelement <2 x float> %B, float %tmp2, i32 1
15*9880d681SAndroid Build Coastguard Worker  ret <2 x float> %tmp3
16*9880d681SAndroid Build Coastguard Worker}
17*9880d681SAndroid Build Coastguard Worker
18*9880d681SAndroid Build Coastguard Worker; CHECK-LABEL: t2:
19*9880d681SAndroid Build Coastguard Workerdefine void @t2(<4 x i8> *%in, <4 x i8> *%out, i32 %n) {
20*9880d681SAndroid Build Coastguard Workerentry:
21*9880d681SAndroid Build Coastguard Worker  br label %loop
22*9880d681SAndroid Build Coastguard Workerloop:
23*9880d681SAndroid Build Coastguard Worker; The code generated by this test uses a vld1.32 instruction.
24*9880d681SAndroid Build Coastguard Worker; We check that a dependency breaking vmov* instruction was
25*9880d681SAndroid Build Coastguard Worker; generated.
26*9880d681SAndroid Build Coastguard Worker
27*9880d681SAndroid Build Coastguard Worker; CHECK: vmov.{{.*}} d{{[0-9]+}},
28*9880d681SAndroid Build Coastguard Worker  %oldcount = phi i32 [0, %entry], [%newcount, %loop]
29*9880d681SAndroid Build Coastguard Worker  %newcount = add i32 %oldcount, 1
30*9880d681SAndroid Build Coastguard Worker  %p1 = getelementptr <4 x i8>, <4 x i8> *%in, i32 %newcount
31*9880d681SAndroid Build Coastguard Worker  %p2 = getelementptr <4 x i8>, <4 x i8> *%out, i32 %newcount
32*9880d681SAndroid Build Coastguard Worker  %tmp1 = load <4 x i8> , <4 x i8> *%p1, align 4
33*9880d681SAndroid Build Coastguard Worker  store <4 x i8> %tmp1, <4 x i8> *%p2
34*9880d681SAndroid Build Coastguard Worker  %cmp = icmp eq i32 %newcount, %n
35*9880d681SAndroid Build Coastguard Worker  br i1 %cmp, label %loop, label %ret
36*9880d681SAndroid Build Coastguard Workerret:
37*9880d681SAndroid Build Coastguard Worker  ret void
38*9880d681SAndroid Build Coastguard Worker}
39