• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1; RUN: llc  < %s -march=mips64el -mcpu=mips4 -target-abi=n64 | FileCheck %s
2; RUN: llc  < %s -march=mips64el -mcpu=mips64 -target-abi=n64 | FileCheck %s
3
4define i64 @zext64_32(i32 %a) nounwind readnone {
5entry:
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
14define i64 @sext64_32(i32 %a) nounwind readnone {
15entry:
16; CHECK: sll ${{[0-9]+}}, ${{[0-9]+}}, 0
17  %conv = sext i32 %a to i64
18  ret i64 %conv
19}
20
21define i64 @i64_float(float %f) nounwind readnone {
22entry:
23; CHECK: trunc.l.s
24  %conv = fptosi float %f to i64
25  ret i64 %conv
26}
27
28