2016-06-03 18:22:22 +08:00
|
|
|
; RUN: llc -march=mips64el -filetype=obj -mcpu=mips64r2 %s -o - | \
|
|
|
|
; RUN: llvm-objdump -disassemble - | FileCheck %s
|
2012-08-07 08:35:22 +08:00
|
|
|
|
|
|
|
; Sign extend from 32 to 64 was creating nonsense opcodes
|
|
|
|
|
2012-11-03 08:05:43 +08:00
|
|
|
; CHECK: sll ${{[a-z0-9]+}}, ${{[a-z0-9]+}}, 0
|
2012-08-07 08:35:22 +08:00
|
|
|
|
|
|
|
define i64 @foo(i32 %ival) nounwind readnone {
|
|
|
|
entry:
|
|
|
|
%conv = sext i32 %ival to i64
|
|
|
|
ret i64 %conv
|
|
|
|
}
|
2012-08-10 03:43:18 +08:00
|
|
|
|
2012-11-03 08:05:43 +08:00
|
|
|
; CHECK: dsll32 ${{[a-z0-9]+}}, ${{[a-z0-9]+}}, 0
|
2012-08-10 03:43:18 +08:00
|
|
|
|
|
|
|
define i64 @foo_2(i32 %ival_2) nounwind readnone {
|
|
|
|
entry:
|
|
|
|
%conv_2 = zext i32 %ival_2 to i64
|
|
|
|
ret i64 %conv_2
|
|
|
|
}
|
|
|
|
|