e96bc456c5607c121cf524b4c960cf93d079880f
[oota-llvm.git] / test / CodeGen / PowerPC / fold-li.ll
1 ; RUN: llvm-as < %s | llc -march=ppc32 | \
2 ; RUN:   grep -v align | not grep li
3
4 ;; Test that immediates are folded into these instructions correctly.
5
6 define i32 @ADD(i32 %X) {
7         %Y = add i32 %X, 65537          ; <i32> [#uses=1]
8         ret i32 %Y
9 }
10
11 define i32 @SUB(i32 %X) {
12         %Y = sub i32 %X, 65537          ; <i32> [#uses=1]
13         ret i32 %Y
14 }
15