Home | History | Annotate | Download | only in Mips
      1 ; RUN: llc -march=mips64el -mcpu=mips64 < %s | FileCheck %s
      2 
      3 define i64 @m0(i64 %a0, i64 %a1) nounwind readnone {
      4 entry:
      5 ; CHECK: dmult
      6 ; CHECK: mflo
      7   %mul = mul i64 %a1, %a0
      8   ret i64 %mul
      9 }
     10 
     11 define i64 @m1(i64 %a) nounwind readnone {
     12 entry:
     13 ; CHECK: dmult
     14 ; CHECK: mfhi
     15   %div = sdiv i64 %a, 3
     16   ret i64 %div
     17 }
     18 
     19 define i64 @d0(i64 %a0, i64 %a1) nounwind readnone {
     20 entry:
     21 ; CHECK: ddivu
     22 ; CHECK: mflo
     23   %div = udiv i64 %a0, %a1
     24   ret i64 %div
     25 }
     26 
     27 define i64 @d1(i64 %a0, i64 %a1) nounwind readnone {
     28 entry:
     29 ; CHECK: ddiv
     30 ; CHECK: mflo
     31   %div = sdiv i64 %a0, %a1
     32   ret i64 %div
     33 }
     34 
     35 define i64 @d2(i64 %a0, i64 %a1) nounwind readnone {
     36 entry:
     37 ; CHECK: ddivu
     38 ; CHECK: mfhi
     39   %rem = urem i64 %a0, %a1
     40   ret i64 %rem
     41 }
     42 
     43 define i64 @d3(i64 %a0, i64 %a1) nounwind readnone {
     44 entry:
     45 ; CHECK: ddiv
     46 ; CHECK: mfhi
     47   %rem = srem i64 %a0, %a1
     48   ret i64 %rem
     49 }
     50