Home | History | Annotate | Download | only in Thumb
      1 ; RUN: llc < %s -march=thumb | \
      2 ; RUN:   grep mvn | count 1
      3 ; RUN: llc < %s -march=thumb | \
      4 ; RUN:   grep adc | count 1
      5 ; RUN: llc < %s -march=thumb | \
      6 ; RUN:   grep sbc | count 1
      7 ; RUN: llc < %s -mtriple=thumb-apple-darwin | grep __muldi3
      8 
      9 define i64 @f1() {
     10 entry:
     11         ret i64 0
     12 }
     13 
     14 define i64 @f2() {
     15 entry:
     16         ret i64 1
     17 }
     18 
     19 define i64 @f3() {
     20 entry:
     21         ret i64 2147483647
     22 }
     23 
     24 define i64 @f4() {
     25 entry:
     26         ret i64 2147483648
     27 }
     28 
     29 define i64 @f5() {
     30 entry:
     31         ret i64 9223372036854775807
     32 }
     33 
     34 define i64 @f6(i64 %x, i64 %y) {
     35 entry:
     36         %tmp1 = add i64 %y, 1           ; <i64> [#uses=1]
     37         ret i64 %tmp1
     38 }
     39 
     40 define void @f7() {
     41 entry:
     42         %tmp = call i64 @f8( )          ; <i64> [#uses=0]
     43         ret void
     44 }
     45 
     46 declare i64 @f8()
     47 
     48 define i64 @f9(i64 %a, i64 %b) {
     49 entry:
     50         %tmp = sub i64 %a, %b           ; <i64> [#uses=1]
     51         ret i64 %tmp
     52 }
     53 
     54 define i64 @f(i32 %a, i32 %b) {
     55 entry:
     56         %tmp = sext i32 %a to i64               ; <i64> [#uses=1]
     57         %tmp1 = sext i32 %b to i64              ; <i64> [#uses=1]
     58         %tmp2 = mul i64 %tmp1, %tmp             ; <i64> [#uses=1]
     59         ret i64 %tmp2
     60 }
     61 
     62 define i64 @g(i32 %a, i32 %b) {
     63 entry:
     64         %tmp = zext i32 %a to i64               ; <i64> [#uses=1]
     65         %tmp1 = zext i32 %b to i64              ; <i64> [#uses=1]
     66         %tmp2 = mul i64 %tmp1, %tmp             ; <i64> [#uses=1]
     67         ret i64 %tmp2
     68 }
     69 
     70 define i64 @f10() {
     71 entry:
     72         %a = alloca i64, align 8                ; <i64*> [#uses=1]
     73         %retval = load i64* %a          ; <i64> [#uses=1]
     74         ret i64 %retval
     75 }
     76 
     77