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