mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-11-16 11:05:54 +00:00
69dba7e204
transformed to the final instruction variant. An example would be dsrll which is transformed into dsll32 if the shift value is greater than 32. For direct object output we need to do this transformation in the codegen. If the instruction was inside branch delay slot, it was being missed. This patch corrects this oversight. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@162779 91177308-0d34-0410-b5e6-96231b3b80d8
49 lines
1.1 KiB
LLVM
49 lines
1.1 KiB
LLVM
; RUN: llc -march=mips64el -filetype=obj -mcpu=mips64r2 -disable-mips-delay-filler %s -o - \
|
|
; RUN: | llvm-objdump -disassemble -triple mips64el - | FileCheck %s
|
|
|
|
; RUN: llc -march=mips64el -filetype=obj -mcpu=mips64r2 %s -o - \
|
|
; RUN: | llvm-objdump -disassemble -triple mips64el - | FileCheck %s
|
|
|
|
define i64 @f3(i64 %a0) nounwind readnone {
|
|
entry:
|
|
; CHECK: dsll ${{[0-9]+}}, ${{[0-9]+}}, 10
|
|
%shl = shl i64 %a0, 10
|
|
ret i64 %shl
|
|
}
|
|
|
|
define i64 @f4(i64 %a0) nounwind readnone {
|
|
entry:
|
|
; CHECK: dsra ${{[0-9]+}}, ${{[0-9]+}}, 10
|
|
%shr = ashr i64 %a0, 10
|
|
ret i64 %shr
|
|
}
|
|
|
|
define i64 @f5(i64 %a0) nounwind readnone {
|
|
entry:
|
|
; CHECK: dsrl ${{[0-9]+}}, ${{[0-9]+}}, 10
|
|
%shr = lshr i64 %a0, 10
|
|
ret i64 %shr
|
|
}
|
|
|
|
define i64 @f6(i64 %a0) nounwind readnone {
|
|
entry:
|
|
; CHECK: dsll32 ${{[0-9]+}}, ${{[0-9]+}}, 8
|
|
%shl = shl i64 %a0, 40
|
|
ret i64 %shl
|
|
}
|
|
|
|
define i64 @f7(i64 %a0) nounwind readnone {
|
|
entry:
|
|
; CHECK: dsra32 ${{[0-9]+}}, ${{[0-9]+}}, 8
|
|
%shr = ashr i64 %a0, 40
|
|
ret i64 %shr
|
|
}
|
|
|
|
define i64 @f8(i64 %a0) nounwind readnone {
|
|
entry:
|
|
; CHECK: dsrl32 ${{[0-9]+}}, ${{[0-9]+}}, 8
|
|
%shr = lshr i64 %a0, 40
|
|
ret i64 %shr
|
|
}
|
|
|