source: icGREP/icgrep-devel/llvm-3.8.0.src/test/CodeGen/ARM/fpmem.ll @ 5027

Last change on this file since 5027 was 5027, checked in by cameron, 3 years ago

Upgrade to llvm 3.8

File size: 1.1 KB
Line 
1; RUN: llc -mtriple=arm -float-abi=soft -mattr=+vfp2 %s -o - | FileCheck %s
2
3define float @f1(float %a) {
4; CHECK-LABEL: f1:
5; CHECK: mov r0, #0
6        ret float 0.000000e+00
7}
8
9define float @f2(float* %v, float %u) {
10; CHECK-LABEL: f2:
11; CHECK: vldr{{.*}}[
12        %tmp = load float, float* %v           ; <float> [#uses=1]
13        %tmp1 = fadd float %tmp, %u              ; <float> [#uses=1]
14        ret float %tmp1
15}
16
17define float @f2offset(float* %v, float %u) {
18; CHECK-LABEL: f2offset:
19; CHECK: vldr{{.*}}, #4]
20        %addr = getelementptr float, float* %v, i32 1
21        %tmp = load float, float* %addr
22        %tmp1 = fadd float %tmp, %u
23        ret float %tmp1
24}
25
26define float @f2noffset(float* %v, float %u) {
27; CHECK-LABEL: f2noffset:
28; CHECK: vldr{{.*}}, #-4]
29        %addr = getelementptr float, float* %v, i32 -1
30        %tmp = load float, float* %addr
31        %tmp1 = fadd float %tmp, %u
32        ret float %tmp1
33}
34
35define void @f3(float %a, float %b, float* %v) {
36; CHECK-LABEL: f3:
37; CHECK: vstr{{.*}}[
38        %tmp = fadd float %a, %b         ; <float> [#uses=1]
39        store float %tmp, float* %v
40        ret void
41}
Note: See TracBrowser for help on using the repository browser.