2005-08-18 19:38:57 +00:00
|
|
|
; All of these routines should be perform optimal load of constants.
|
2009-09-09 00:09:15 +00:00
|
|
|
; RUN: llc < %s -march=ppc32 | \
|
2007-08-15 13:36:28 +00:00
|
|
|
; RUN: grep lis | count 5
|
2009-09-09 00:09:15 +00:00
|
|
|
; RUN: llc < %s -march=ppc32 | \
|
2007-08-15 13:36:28 +00:00
|
|
|
; RUN: grep ori | count 3
|
2009-09-09 00:09:15 +00:00
|
|
|
; RUN: llc < %s -march=ppc32 | \
|
2007-08-15 13:36:28 +00:00
|
|
|
; RUN: grep {li } | count 4
|
2005-08-18 19:32:46 +00:00
|
|
|
|
2008-02-19 08:07:33 +00:00
|
|
|
define i32 @f1() {
|
2005-08-18 19:32:46 +00:00
|
|
|
entry:
|
2008-02-19 08:07:33 +00:00
|
|
|
ret i32 1
|
2005-08-18 19:32:46 +00:00
|
|
|
}
|
|
|
|
|
2008-02-19 08:07:33 +00:00
|
|
|
define i32 @f2() {
|
2005-08-18 19:32:46 +00:00
|
|
|
entry:
|
2008-02-19 08:07:33 +00:00
|
|
|
ret i32 -1
|
2005-08-18 19:32:46 +00:00
|
|
|
}
|
|
|
|
|
2008-02-19 08:07:33 +00:00
|
|
|
define i32 @f3() {
|
2005-08-18 19:32:46 +00:00
|
|
|
entry:
|
2008-02-19 08:07:33 +00:00
|
|
|
ret i32 0
|
2005-08-18 19:32:46 +00:00
|
|
|
}
|
|
|
|
|
2008-02-19 08:07:33 +00:00
|
|
|
define i32 @f4() {
|
2005-08-18 19:32:46 +00:00
|
|
|
entry:
|
2008-02-19 08:07:33 +00:00
|
|
|
ret i32 32767
|
2005-08-18 19:32:46 +00:00
|
|
|
}
|
|
|
|
|
2008-02-19 08:07:33 +00:00
|
|
|
define i32 @f5() {
|
2005-08-18 19:32:46 +00:00
|
|
|
entry:
|
2008-02-19 08:07:33 +00:00
|
|
|
ret i32 65535
|
2005-08-18 19:32:46 +00:00
|
|
|
}
|
|
|
|
|
2008-02-19 08:07:33 +00:00
|
|
|
define i32 @f6() {
|
2005-08-18 19:32:46 +00:00
|
|
|
entry:
|
2008-02-19 08:07:33 +00:00
|
|
|
ret i32 65536
|
2005-08-18 19:32:46 +00:00
|
|
|
}
|
|
|
|
|
2008-02-19 08:07:33 +00:00
|
|
|
define i32 @f7() {
|
2005-08-18 19:32:46 +00:00
|
|
|
entry:
|
2008-02-19 08:07:33 +00:00
|
|
|
ret i32 131071
|
2005-08-18 19:32:46 +00:00
|
|
|
}
|
|
|
|
|
2008-02-19 08:07:33 +00:00
|
|
|
define i32 @f8() {
|
2005-08-18 19:32:46 +00:00
|
|
|
entry:
|
2008-02-19 08:07:33 +00:00
|
|
|
ret i32 2147483647
|
2005-08-18 19:32:46 +00:00
|
|
|
}
|
|
|
|
|
2008-02-19 08:07:33 +00:00
|
|
|
define i32 @f9() {
|
2005-08-18 19:32:46 +00:00
|
|
|
entry:
|
2008-02-19 08:07:33 +00:00
|
|
|
ret i32 -2147483648
|
2005-08-18 19:32:46 +00:00
|
|
|
}
|