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