Home | History | Annotate | Download | only in PowerPC
      1 ; All of these routines should be perform optimal load of constants.
      2 ; RUN: llc < %s -march=ppc32 | \
      3 ; RUN:   grep lis | count 5
      4 ; RUN: llc < %s -march=ppc32 | \
      5 ; RUN:   grep ori | count 3
      6 ; RUN: llc < %s -march=ppc32 | \
      7 ; RUN:   grep {li } | count 4
      8 
      9 define i32 @f1() {
     10 entry:
     11 	ret i32 1
     12 }
     13 
     14 define i32 @f2() {
     15 entry:
     16 	ret i32 -1
     17 }
     18 
     19 define i32 @f3() {
     20 entry:
     21 	ret i32 0
     22 }
     23 
     24 define i32 @f4() {
     25 entry:
     26 	ret i32 32767
     27 }
     28 
     29 define i32 @f5() {
     30 entry:
     31 	ret i32 65535
     32 }
     33 
     34 define i32 @f6() {
     35 entry:
     36 	ret i32 65536
     37 }
     38 
     39 define i32 @f7() {
     40 entry:
     41 	ret i32 131071
     42 }
     43 
     44 define i32 @f8() {
     45 entry:
     46 	ret i32 2147483647
     47 }
     48 
     49 define i32 @f9() {
     50 entry:
     51 	ret i32 -2147483648
     52 }
     53