2008-04-14 17:56:54 +00:00
|
|
|
; RUN: llvm-as < %s | llc -march=ppc32 | \
|
2007-04-16 17:36:08 +00:00
|
|
|
; RUN: grep -v align | not grep li
|
2005-09-28 23:03:11 +00:00
|
|
|
|
|
|
|
;; Test that immediates are folded into these instructions correctly.
|
|
|
|
|
2008-03-31 23:20:09 +00:00
|
|
|
define i32 @ADD(i32 %X) nounwind {
|
2008-02-19 08:07:33 +00:00
|
|
|
%Y = add i32 %X, 65537 ; <i32> [#uses=1]
|
|
|
|
ret i32 %Y
|
2005-09-28 23:03:11 +00:00
|
|
|
}
|
|
|
|
|
2008-03-31 23:20:09 +00:00
|
|
|
define i32 @SUB(i32 %X) nounwind {
|
2008-02-19 08:07:33 +00:00
|
|
|
%Y = sub i32 %X, 65537 ; <i32> [#uses=1]
|
|
|
|
ret i32 %Y
|
2005-09-28 23:03:11 +00:00
|
|
|
}
|
2008-02-19 08:07:33 +00:00
|
|
|
|