summaryrefslogtreecommitdiff
path: root/test/CodeGen/PowerPC/constants.ll
blob: a22d97089344df65768ccb0c8043cae3588740ac (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
; All of these ands and shifts should be folded into constants's
; RUN: llvm-as < constants.ll | llc -march=ppc32 | grep lis | wc -l | grep 5 &&
; RUN: llvm-as < constants.ll | llc -march=ppc32 | grep ori | wc -l | grep 3 &&
; RUN: llvm-as < constants.ll | llc -march=ppc32 | grep li | wc -l | grep 18

implementation   ; Functions:

int %_Z2f1v() {
entry:
        ret int 1
}

int %_Z2f2v() {
entry:
        ret int -1
}

int %_Z2f3v() {
entry:
        ret int 0
}

int %_Z2f4v() {
entry:
        ret int 32767
}

int %_Z2f5v() {
entry:
        ret int 65535
}

int %_Z2f6v() {
entry:
        ret int 65536
}

int %_Z2f7v() {
entry:
        ret int 131071
}

int %_Z2f8v() {
entry:
        ret int 2147483647
}

int %_Z2f9v() {
entry:
        ret int -2147483648
}