mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-09-01 04:29:57 +00:00
Summary: $rs and $rt were the wrong way round in the .td and the testcase wasn't strict enough to detect the mistake. Reviewers: matheusalmeida Reviewed By: matheusalmeida Differential Revision: http://llvm-reviews.chandlerc.com/D2554 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199498 91177308-0d34-0410-b5e6-96231b3b80d8
27 lines
630 B
LLVM
27 lines
630 B
LLVM
; Test the MSA intrinsics that are encoded with the SPECIAL instruction format.
|
|
|
|
; RUN: llc -march=mips -mattr=+msa,+fp64 < %s | FileCheck %s
|
|
|
|
define i32 @llvm_mips_lsa_test(i32 %a, i32 %b) nounwind {
|
|
entry:
|
|
%0 = tail call i32 @llvm.mips.lsa(i32 %a, i32 %b, i32 2)
|
|
ret i32 %0
|
|
}
|
|
|
|
declare i32 @llvm.mips.lsa(i32, i32, i32) nounwind
|
|
|
|
; CHECK: llvm_mips_lsa_test:
|
|
; CHECK: lsa {{\$[0-9]+}}, $5, $4, 2
|
|
; CHECK: .size llvm_mips_lsa_test
|
|
|
|
define i32 @lsa_test(i32 %a, i32 %b) nounwind {
|
|
entry:
|
|
%0 = shl i32 %b, 2
|
|
%1 = add i32 %a, %0
|
|
ret i32 %1
|
|
}
|
|
|
|
; CHECK: lsa_test:
|
|
; CHECK: lsa {{\$[0-9]+}}, $5, $4, 2
|
|
; CHECK: .size lsa_test
|