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