blob: 36eddb181d095a041ae658cbd2ce586ba1be5bf1 [file] [log] [blame]
Dan Gohmanf17a25c2007-07-18 16:29:46 +00001; All of these should be codegen'd without loading immediates
2; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 -o %t -f
Dan Gohman8c89a502007-08-15 13:36:28 +00003; RUN: grep subfc %t | count 1
4; RUN: grep subfe %t | count 1
5; RUN: grep subfze %t | count 1
6; RUN: grep subfme %t | count 1
7; RUN: grep subfic %t | count 2
Dan Gohmanf17a25c2007-07-18 16:29:46 +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}