Home | History | Annotate | Download | only in Mips
      1 ; RUN: llc  < %s -march=mips64el -mcpu=mips4 -mattr=n64 | FileCheck %s
      2 ; RUN: llc  < %s -march=mips64el -mcpu=mips64 -mattr=n64 | FileCheck %s
      3 
      4 define i64 @zext64_32(i32 %a) nounwind readnone {
      5 entry:
      6 ; CHECK: addiu $[[R0:[0-9]+]], ${{[0-9]+}}, 2
      7 ; CHECK: dsll $[[R1:[0-9]+]], $[[R0]], 32
      8 ; CHECK: dsrl ${{[0-9]+}}, $[[R1]], 32
      9   %add = add i32 %a, 2
     10   %conv = zext i32 %add to i64
     11   ret i64 %conv
     12 }
     13 
     14 define i64 @sext64_32(i32 %a) nounwind readnone {
     15 entry:
     16 ; CHECK: sll ${{[0-9]+}}, ${{[0-9]+}}, 0
     17   %conv = sext i32 %a to i64
     18   ret i64 %conv
     19 }
     20 
     21 define i64 @i64_float(float %f) nounwind readnone {
     22 entry:
     23 ; CHECK: trunc.l.s 
     24   %conv = fptosi float %f to i64
     25   ret i64 %conv
     26 }
     27 
     28