blob: 89d5d64a8e684ae95aac01575c102a78bf25bc86 [file] [log] [blame]
Dale Johannesen20a253f2008-04-08 18:10:08 +00001; RUN: llvm-as < %s | llc -march=ppc32 -unwind-tables-optional | \
Dan Gohmanf17a25c2007-07-18 16:29:46 +00002; RUN: grep -v align | not grep li
3
4;; Test that immediates are folded into these instructions correctly.
5
Dale Johannesen6e04eac2008-03-31 23:20:09 +00006define i32 @ADD(i32 %X) nounwind {
Tanya Lattner5ebaf3b2008-02-19 08:07:33 +00007 %Y = add i32 %X, 65537 ; <i32> [#uses=1]
8 ret i32 %Y
Dan Gohmanf17a25c2007-07-18 16:29:46 +00009}
10
Dale Johannesen6e04eac2008-03-31 23:20:09 +000011define i32 @SUB(i32 %X) nounwind {
Tanya Lattner5ebaf3b2008-02-19 08:07:33 +000012 %Y = sub i32 %X, 65537 ; <i32> [#uses=1]
13 ret i32 %Y
Dan Gohmanf17a25c2007-07-18 16:29:46 +000014}
Tanya Lattner5ebaf3b2008-02-19 08:07:33 +000015