2005-08-19 03:38:57 +08:00
|
|
|
; All of these routines should be perform optimal load of constants.
|
2007-04-16 05:17:45 +08:00
|
|
|
; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 | \
|
2007-08-15 21:36:28 +08:00
|
|
|
; RUN: grep lis | count 5
|
2007-04-16 05:17:45 +08:00
|
|
|
; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 | \
|
2007-08-15 21:36:28 +08:00
|
|
|
; RUN: grep ori | count 3
|
2007-04-16 05:17:45 +08:00
|
|
|
; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 | \
|
2007-08-15 21:36:28 +08:00
|
|
|
; RUN: grep {li } | count 4
|
2005-08-19 03:32:46 +08:00
|
|
|
|
|
|
|
implementation ; Functions:
|
|
|
|
|
2005-08-19 04:06:09 +08:00
|
|
|
int %f1() {
|
2005-08-19 03:32:46 +08:00
|
|
|
entry:
|
|
|
|
ret int 1
|
|
|
|
}
|
|
|
|
|
2005-08-19 04:06:09 +08:00
|
|
|
int %f2() {
|
2005-08-19 03:32:46 +08:00
|
|
|
entry:
|
|
|
|
ret int -1
|
|
|
|
}
|
|
|
|
|
2005-08-19 04:06:09 +08:00
|
|
|
int %f3() {
|
2005-08-19 03:32:46 +08:00
|
|
|
entry:
|
|
|
|
ret int 0
|
|
|
|
}
|
|
|
|
|
2005-08-19 04:06:09 +08:00
|
|
|
int %f4() {
|
2005-08-19 03:32:46 +08:00
|
|
|
entry:
|
|
|
|
ret int 32767
|
|
|
|
}
|
|
|
|
|
2005-08-19 04:06:09 +08:00
|
|
|
int %f5() {
|
2005-08-19 03:32:46 +08:00
|
|
|
entry:
|
|
|
|
ret int 65535
|
|
|
|
}
|
|
|
|
|
2005-08-19 04:06:09 +08:00
|
|
|
int %f6() {
|
2005-08-19 03:32:46 +08:00
|
|
|
entry:
|
|
|
|
ret int 65536
|
|
|
|
}
|
|
|
|
|
2005-08-19 04:06:09 +08:00
|
|
|
int %f7() {
|
2005-08-19 03:32:46 +08:00
|
|
|
entry:
|
|
|
|
ret int 131071
|
|
|
|
}
|
|
|
|
|
2005-08-19 04:06:09 +08:00
|
|
|
int %f8() {
|
2005-08-19 03:32:46 +08:00
|
|
|
entry:
|
|
|
|
ret int 2147483647
|
|
|
|
}
|
|
|
|
|
2005-08-19 04:06:09 +08:00
|
|
|
int %f9() {
|
2005-08-19 03:32:46 +08:00
|
|
|
entry:
|
|
|
|
ret int -2147483648
|
|
|
|
}
|