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