mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-12-22 03:28:35 +00:00
794fa1f8f7
llvm-svn: 41097
55 lines
757 B
LLVM
55 lines
757 B
LLVM
; All of these routines should be perform optimal load of constants.
|
|
; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 | \
|
|
; RUN: grep lis | count 5
|
|
; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 | \
|
|
; RUN: grep ori | count 3
|
|
; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 | \
|
|
; RUN: grep {li } | count 4
|
|
|
|
implementation ; Functions:
|
|
|
|
int %f1() {
|
|
entry:
|
|
ret int 1
|
|
}
|
|
|
|
int %f2() {
|
|
entry:
|
|
ret int -1
|
|
}
|
|
|
|
int %f3() {
|
|
entry:
|
|
ret int 0
|
|
}
|
|
|
|
int %f4() {
|
|
entry:
|
|
ret int 32767
|
|
}
|
|
|
|
int %f5() {
|
|
entry:
|
|
ret int 65535
|
|
}
|
|
|
|
int %f6() {
|
|
entry:
|
|
ret int 65536
|
|
}
|
|
|
|
int %f7() {
|
|
entry:
|
|
ret int 131071
|
|
}
|
|
|
|
int %f8() {
|
|
entry:
|
|
ret int 2147483647
|
|
}
|
|
|
|
int %f9() {
|
|
entry:
|
|
ret int -2147483648
|
|
}
|