blob: 36247912f5d3e692a663f362c4300ce1f6d46c14 [file] [log] [blame]
Nate Begeman8ec18172006-02-17 06:24:31 +00001; All of these should be codegen'd without loading immediates
Reid Spencereb1d74e2007-04-16 17:36:08 +00002; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 -o %t -f
3; RUN: grep subfc %t | wc -l | grep 1
4; RUN: grep subfe %t | wc -l | grep 1
5; RUN: grep subfze %t | wc -l | grep 1
6; RUN: grep subfme %t | wc -l | grep 1
7; RUN: grep subfic %t | wc -l | grep 2
Nate Begemanb5fefc72006-02-17 06:16:56 +00008implementation ; Functions:
9
10long %sub_ll(long %a, long %b) {
11entry:
12 %tmp.2 = sub long %a, %b ; <long> [#uses=1]
13 ret long %tmp.2
14}
15
16long %sub_l_5(long %a) {
17entry:
18 %tmp.1 = sub long 5, %a ; <long> [#uses=1]
19 ret long %tmp.1
20}
21
22long %sub_l_m5(long %a) {
23entry:
24 %tmp.1 = sub long -5, %a ; <long> [#uses=1]
25 ret long %tmp.1
26}