blob: 7bbd1eb039ac929a52c26c62b88a047a691b7080 [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
Dan Gohman28beeea2007-08-15 13:36:28 +00003; RUN: grep addc %t | count 1
4; RUN: grep adde %t | count 1
5; RUN: grep addze %t | count 1
6; RUN: grep addme %t | count 1
7; RUN: grep addic %t | count 2
Nate Begemanb5fefc72006-02-17 06:16:56 +00008
9implementation ; Functions:
10
11long %add_ll(long %a, long %b) {
12entry:
13 %tmp.2 = add long %b, %a ; <long> [#uses=1]
14 ret long %tmp.2
15}
16
17long %add_l_5(long %a) {
18entry:
19 %tmp.1 = add long %a, 5 ; <long> [#uses=1]
20 ret long %tmp.1
21}
22
23long %add_l_m5(long %a) {
24entry:
25 %tmp.1 = add long %a, -5 ; <long> [#uses=1]
26 ret long %tmp.1
27}