Home | History | Annotate | Download | only in PowerPC
      1 ; All of these should be codegen'd without loading immediates
      2 ; RUN: llc < %s -mtriple=powerpc-apple-darwin | FileCheck %s
      3 
      4 define i64 @add_ll(i64 %a, i64 %b) nounwind {
      5 entry:
      6         %tmp.2 = add i64 %b, %a         ; <i64> [#uses=1]
      7         ret i64 %tmp.2
      8 ; CHECK: add_ll:
      9 ; CHECK: addc r4, r6, r4
     10 ; CHECK: adde r3, r5, r3
     11 ; CHECK: blr
     12 }
     13 
     14 define i64 @add_l_5(i64 %a) nounwind {
     15 entry:
     16         %tmp.1 = add i64 %a, 5          ; <i64> [#uses=1]
     17         ret i64 %tmp.1
     18 ; CHECK: add_l_5:
     19 ; CHECK: addic r4, r4, 5
     20 ; CHECK: addze r3, r3
     21 ; CHECK: blr
     22 }
     23 
     24 define i64 @add_l_m5(i64 %a) nounwind {
     25 entry:
     26         %tmp.1 = add i64 %a, -5         ; <i64> [#uses=1]
     27         ret i64 %tmp.1
     28 ; CHECK: add_l_m5:
     29 ; CHECK: addic r4, r4, -5
     30 ; CHECK: addme r3, r3
     31 ; CHECK: blr
     32 }
     33 
     34