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

Side by Side Diff: tests_lit/llvm2ice_tests/fp_const_pool.ll

Issue 1387963002: Make sure that all globals are internal, except for "start" functions. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Fix new tests. Created 5 years, 2 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.cmp.ll ('k') | tests_lit/llvm2ice_tests/fpcall.ll » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 ; This tests that different floating point constants (such as 0.0 and -0.0) 1 ; This tests that different floating point constants (such as 0.0 and -0.0)
2 ; remain distinct even when they sort of look equal, and also that different 2 ; remain distinct even when they sort of look equal, and also that different
3 ; instances of the same floating point constant (such as NaN and NaN) get the 3 ; instances of the same floating point constant (such as NaN and NaN) get the
4 ; same constant pool entry even when "a==a" would suggest they are different. 4 ; same constant pool entry even when "a==a" would suggest they are different.
5 5
6 ; REQUIRES: allow_dump 6 ; REQUIRES: allow_dump
7 7
8 define void @consume_float(float %f) { 8 define internal void @consume_float(float %f) {
9 ret void 9 ret void
10 } 10 }
11 11
12 define void @consume_double(double %d) { 12 define internal void @consume_double(double %d) {
13 ret void 13 ret void
14 } 14 }
15 15
16 define void @test_zeros() { 16 define internal void @test_zeros() {
17 entry: 17 entry:
18 call void @consume_float(float 0.0) 18 call void @consume_float(float 0.0)
19 call void @consume_float(float -0.0) 19 call void @consume_float(float -0.0)
20 call void @consume_double(double 0.0) 20 call void @consume_double(double 0.0)
21 call void @consume_double(double -0.0) 21 call void @consume_double(double -0.0)
22 ret void 22 ret void
23 } 23 }
24 ; Parse the function, dump the bitcode back out, and stop without translating. 24 ; Parse the function, dump the bitcode back out, and stop without translating.
25 ; This tests that +0.0 and -0.0 aren't accidentally merged into a single 25 ; This tests that +0.0 and -0.0 aren't accidentally merged into a single
26 ; zero-valued constant pool entry. 26 ; zero-valued constant pool entry.
27 ; 27 ;
28 ; RUN: %p2i -i %s --insts | FileCheck --check-prefix=ZERO %s 28 ; RUN: %p2i -i %s --insts | FileCheck --check-prefix=ZERO %s
29 ; ZERO: test_zeros 29 ; ZERO: test_zeros
30 ; ZERO-NEXT: entry: 30 ; ZERO-NEXT: entry:
31 ; ZERO-NEXT: call void @consume_float(float 0.0 31 ; ZERO-NEXT: call void @consume_float(float 0.0
32 ; ZERO-NEXT: call void @consume_float(float -0.0 32 ; ZERO-NEXT: call void @consume_float(float -0.0
33 ; ZERO-NEXT: call void @consume_double(double 0.0 33 ; ZERO-NEXT: call void @consume_double(double 0.0
34 ; ZERO-NEXT: call void @consume_double(double -0.0 34 ; ZERO-NEXT: call void @consume_double(double -0.0
35 35
36 36
37 define void @test_nans() { 37 define internal void @test_nans() {
38 entry: 38 entry:
39 call void @consume_float(float 0x7FF8000000000000) 39 call void @consume_float(float 0x7FF8000000000000)
40 call void @consume_float(float 0x7FF8000000000000) 40 call void @consume_float(float 0x7FF8000000000000)
41 call void @consume_float(float 0xFFF8000000000000) 41 call void @consume_float(float 0xFFF8000000000000)
42 call void @consume_float(float 0xFFF8000000000000) 42 call void @consume_float(float 0xFFF8000000000000)
43 call void @consume_double(double 0x7FF8000000000000) 43 call void @consume_double(double 0x7FF8000000000000)
44 call void @consume_double(double 0x7FF8000000000000) 44 call void @consume_double(double 0x7FF8000000000000)
45 call void @consume_double(double 0xFFF8000000000000) 45 call void @consume_double(double 0xFFF8000000000000)
46 call void @consume_double(double 0xFFF8000000000000) 46 call void @consume_double(double 0xFFF8000000000000)
47 ret void 47 ret void
(...skipping 14 matching lines...) Expand all
62 ; 62 ;
63 ; RUN: %p2i -i %s --filetype=asm --llvm-source \ 63 ; RUN: %p2i -i %s --filetype=asm --llvm-source \
64 ; RUN: | FileCheck --check-prefix=NANS3 %s 64 ; RUN: | FileCheck --check-prefix=NANS3 %s
65 ; NANS3: double nan 65 ; NANS3: double nan
66 ; NANS3-NOT: double nan 66 ; NANS3-NOT: double nan
67 ; 67 ;
68 ; RUN: %p2i -i %s --filetype=asm --llvm-source \ 68 ; RUN: %p2i -i %s --filetype=asm --llvm-source \
69 ; RUN: | FileCheck --check-prefix=NANS4 %s 69 ; RUN: | FileCheck --check-prefix=NANS4 %s
70 ; NANS4: double -nan 70 ; NANS4: double -nan
71 ; NANS4-NOT: double -nan 71 ; NANS4-NOT: double -nan
OLDNEW
« no previous file with comments | « tests_lit/llvm2ice_tests/fp.cmp.ll ('k') | tests_lit/llvm2ice_tests/fpcall.ll » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698