summaryrefslogtreecommitdiff
path: root/test/MC/Mips/sext_64_32.ll
blob: e5c57b8c41d8ced26b85794f3bd008b7d8d54c9c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
; RUN: llc -march=mips64el -filetype=obj -mcpu=mips64r2 %s -o - | llvm-objdump -disassemble -triple mips64el - | FileCheck %s

; Sign extend from 32 to 64 was creating nonsense opcodes

; CHECK: sll ${{[0-9]+}}, ${{[0-9]+}}, 0

define i64 @foo(i32 %ival) nounwind readnone {
entry:
  %conv = sext i32 %ival to i64
  ret i64 %conv
}

; CHECK: dsll32 ${{[0-9]+}}, ${{[0-9]+}}, 0

define i64 @foo_2(i32 %ival_2) nounwind readnone {
entry:
  %conv_2 = zext i32 %ival_2 to i64
  ret i64 %conv_2
}