comparison test/CodeGen/PowerPC/constants.ll @ 0:95c75e76d11b

LLVM 3.4
author Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
date Thu, 12 Dec 2013 13:56:28 +0900
parents
children 1172e4bd9c6f
comparison
equal deleted inserted replaced
-1:000000000000 0:95c75e76d11b
1 ; All of these routines should be perform optimal load of constants.
2 ; RUN: llc < %s -march=ppc32 | \
3 ; RUN: grep lis | count 5
4 ; RUN: llc < %s -march=ppc32 | \
5 ; RUN: grep ori | count 3
6 ; RUN: llc < %s -march=ppc32 | \
7 ; RUN: grep "li " | count 4
8
9 define i32 @f1() {
10 entry:
11 ret i32 1
12 }
13
14 define i32 @f2() {
15 entry:
16 ret i32 -1
17 }
18
19 define i32 @f3() {
20 entry:
21 ret i32 0
22 }
23
24 define i32 @f4() {
25 entry:
26 ret i32 32767
27 }
28
29 define i32 @f5() {
30 entry:
31 ret i32 65535
32 }
33
34 define i32 @f6() {
35 entry:
36 ret i32 65536
37 }
38
39 define i32 @f7() {
40 entry:
41 ret i32 131071
42 }
43
44 define i32 @f8() {
45 entry:
46 ret i32 2147483647
47 }
48
49 define i32 @f9() {
50 entry:
51 ret i32 -2147483648
52 }