Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1)

Side by Side Diff: tests_lit/llvm2ice_tests/fp.load_store.ll

Issue 2316933002: [SubZero] Implement GP to/from FP moves for MIPS (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Rebase to master Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « tests_lit/llvm2ice_tests/fp.convert.ll ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 ; This tries to be a comprehensive test of f32 and f64 compare operations. 1 ; This tries to be a comprehensive test of f32 and f64 compare operations.
2 ; The CHECK lines are only checking for basic instruction patterns 2 ; The CHECK lines are only checking for basic instruction patterns
3 ; that should be present regardless of the optimization level, so 3 ; that should be present regardless of the optimization level, so
4 ; there are no special OPTM1 match lines. 4 ; there are no special OPTM1 match lines.
5 5
6 ; RUN: %p2i --filetype=obj --disassemble -i %s --args -O2 | FileCheck %s 6 ; RUN: %p2i --filetype=obj --disassemble -i %s --args -O2 | FileCheck %s
7 ; RUN: %p2i --filetype=obj --disassemble -i %s --args -Om1 | FileCheck %s 7 ; RUN: %p2i --filetype=obj --disassemble -i %s --args -Om1 | FileCheck %s
8 8
9 ; RUN: %if --need=target_MIPS32 --need=allow_dump \ 9 ; RUN: %if --need=target_MIPS32 --need=allow_dump \
10 ; RUN: --command %p2i --filetype=asm --assemble \ 10 ; RUN: --command %p2i --filetype=asm --assemble \
11 ; RUN: --disassemble --target mips32 -i %s --args -Om1 --skip-unimplemented \ 11 ; RUN: --disassemble --target mips32 -i %s --args -Om1 --skip-unimplemented \
12 ; RUN: -allow-externally-defined-symbols \ 12 ; RUN: -allow-externally-defined-symbols \
13 ; RUN: | %if --need=target_MIPS32 --need=allow_dump \ 13 ; RUN: | %if --need=target_MIPS32 --need=allow_dump \
14 ; RUN: --command FileCheck --check-prefix MIPS32 %s 14 ; RUN: --command FileCheck --check-prefix MIPS32 %s
15 15
16 ; RUN: %if --need=target_MIPS32 --need=allow_dump \
17 ; RUN: --command %p2i --filetype=asm --assemble \
18 ; RUN: --disassemble --target mips32 -i %s --args -O2 --skip-unimplemented \
19 ; RUN: -allow-externally-defined-symbols \
20 ; RUN: | %if --need=target_MIPS32 --need=allow_dump \
21 ; RUN: --command FileCheck --check-prefix MIPS32O2 %s
22
16 define internal float @loadFloat(i32 %a) { 23 define internal float @loadFloat(i32 %a) {
17 entry: 24 entry:
18 %__1 = inttoptr i32 %a to float* 25 %__1 = inttoptr i32 %a to float*
19 %v0 = load float, float* %__1, align 4 26 %v0 = load float, float* %__1, align 4
20 ret float %v0 27 ret float %v0
21 } 28 }
22 ; CHECK-LABEL: loadFloat 29 ; CHECK-LABEL: loadFloat
23 ; CHECK: movss 30 ; CHECK: movss
24 ; CHECK: fld 31 ; CHECK: fld
25 32
26 ; MIPS32-LABEL: loadFloat 33 ; MIPS32-LABEL: loadFloat
27 ; MIPS32: lwc1 $f{{.*}},0{{.*}} 34 ; MIPS32: lwc1 $f{{.*}},0{{.*}}
35 ; MIPS32O2-LABEL: loadFloat
36 ; MIPS32O2: lwc1 $f{{.*}},0{{.*}}
28 37
29 define internal double @loadDouble(i32 %a) { 38 define internal double @loadDouble(i32 %a) {
30 entry: 39 entry:
31 %__1 = inttoptr i32 %a to double* 40 %__1 = inttoptr i32 %a to double*
32 %v0 = load double, double* %__1, align 8 41 %v0 = load double, double* %__1, align 8
33 ret double %v0 42 ret double %v0
34 } 43 }
35 ; CHECK-LABEL: loadDouble 44 ; CHECK-LABEL: loadDouble
36 ; CHECK: movsd 45 ; CHECK: movsd
37 ; CHECK: fld 46 ; CHECK: fld
38 47
39 ; MIPS32-LABEL: loadDouble 48 ; MIPS32-LABEL: loadDouble
40 ; MIPS32: ldc1 $f{{.*}},0{{.*}} 49 ; MIPS32: ldc1 $f{{.*}},0{{.*}}
50 ; MIPS32O2-LABEL: loadDouble
51 ; MIPS32O2: ldc1 $f{{.*}},0{{.*}}
41 52
42 define internal void @storeFloat(i32 %a, float %value) { 53 define internal void @storeFloat(i32 %a, float %value) {
43 entry: 54 entry:
44 %__2 = inttoptr i32 %a to float* 55 %__2 = inttoptr i32 %a to float*
45 store float %value, float* %__2, align 4 56 store float %value, float* %__2, align 4
46 ret void 57 ret void
47 } 58 }
48 ; CHECK-LABEL: storeFloat 59 ; CHECK-LABEL: storeFloat
49 ; CHECK: movss 60 ; CHECK: movss
50 ; CHECK: movss 61 ; CHECK: movss
51 62
52 ; MIPS32-LABEL: storeFloat 63 ; MIPS32-LABEL: storeFloat
53 ; MIPS32: swc1 $f{{.*}},0{{.*}} 64 ; MIPS32: swc1 $f{{.*}},0{{.*}}
65 ; MIPS32O2-LABEL: storeFloat
66 ; MIPS32O2: mtc1 a1,$f{{.*}}
67 ; MIPS32O2: swc1 $f{{.*}},0(a0)
54 68
55 define internal void @storeDouble(i32 %a, double %value) { 69 define internal void @storeDouble(i32 %a, double %value) {
56 entry: 70 entry:
57 %__2 = inttoptr i32 %a to double* 71 %__2 = inttoptr i32 %a to double*
58 store double %value, double* %__2, align 8 72 store double %value, double* %__2, align 8
59 ret void 73 ret void
60 } 74 }
61 ; CHECK-LABEL: storeDouble 75 ; CHECK-LABEL: storeDouble
62 ; CHECK: movsd 76 ; CHECK: movsd
63 ; CHECK: movsd 77 ; CHECK: movsd
64 78
65 ; MIPS32-LABEL: storeDouble 79 ; MIPS32-LABEL: storeDouble
66 ; MIPS32: ldc1 $f{{.*}},4{{.*}} 80 ; MIPS32: ldc1 $f{{.*}},4{{.*}}
67 ; MIPS32: sdc1 $f{{.*}},0{{.*}} 81 ; MIPS32: sdc1 $f{{.*}},0{{.*}}
82 ; MIPS32O2-LABEL: storeDouble
83 ; MIPS32O2: mtc1 a3,$f{{.*}}
84 ; MIPS32O2: mtc1 a2,$f{{.*}}
85 ; MIPS32O2: sdc1 $f{{.*}},0(a0)
68 86
69 define internal void @storeFloatConst(i32 %a) { 87 define internal void @storeFloatConst(i32 %a) {
70 entry: 88 entry:
71 %a.asptr = inttoptr i32 %a to float* 89 %a.asptr = inttoptr i32 %a to float*
72 store float 0x3FF3AE1480000000, float* %a.asptr, align 4 90 store float 0x3FF3AE1480000000, float* %a.asptr, align 4
73 ret void 91 ret void
74 } 92 }
75 ; CHECK-LABEL: storeFloatConst 93 ; CHECK-LABEL: storeFloatConst
76 ; CHECK: movss 94 ; CHECK: movss
77 ; CHECK: movss 95 ; CHECK: movss
78 96
79 ; MIPS32-LABEL: storeFloatConst 97 ; MIPS32-LABEL: storeFloatConst
80 ; MIPS32: lui {{.*}},{{.*}} 98 ; MIPS32: lui {{.*}},{{.*}}
81 ; MIPS32: lwc1 $f{{.*}},{{.*}} 99 ; MIPS32: lwc1 $f{{.*}},{{.*}}
82 ; MIPS32: swc1 $f{{.*}},0{{.*}} 100 ; MIPS32: swc1 $f{{.*}},0{{.*}}
101 ; MIPS32O2-LABEL: storeFloatConst
102 ; MIPS32O2: lui {{.*}},{{.*}}
103 ; MIPS32O2: lwc1 $f{{.*}},{{.*}}
104 ; MIPS32O2: swc1 $f{{.*}},0{{.*}}
83 105
84 define internal void @storeDoubleConst(i32 %a) { 106 define internal void @storeDoubleConst(i32 %a) {
85 entry: 107 entry:
86 %a.asptr = inttoptr i32 %a to double* 108 %a.asptr = inttoptr i32 %a to double*
87 store double 1.230000e+00, double* %a.asptr, align 8 109 store double 1.230000e+00, double* %a.asptr, align 8
88 ret void 110 ret void
89 } 111 }
90 ; CHECK-LABEL: storeDoubleConst 112 ; CHECK-LABEL: storeDoubleConst
91 ; CHECK: movsd 113 ; CHECK: movsd
92 ; CHECK: movsd 114 ; CHECK: movsd
93 115
94 ; MIPS32-LABEL: storeDoubleConst 116 ; MIPS32-LABEL: storeDoubleConst
95 ; MIPS32: lui {{.*}},{{.*}} 117 ; MIPS32: lui {{.*}},{{.*}}
96 ; MIPS32: ldc1 $f{{.*}},{{.*}} 118 ; MIPS32: ldc1 $f{{.*}},{{.*}}
97 ; MIPS32: sdc1 $f{{.*}},0{{.*}} 119 ; MIPS32: sdc1 $f{{.*}},0{{.*}}
120 ; MIPS32O2-LABEL: storeDoubleConst
121 ; MIPS32O2: lui {{.*}},{{.*}}
122 ; MIPS32O2: ldc1 $f{{.*}},{{.*}}
123 ; MIPS32O2: sdc1 $f{{.*}},0{{.*}}
OLDNEW
« no previous file with comments | « tests_lit/llvm2ice_tests/fp.convert.ll ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698