mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-28 04:33:05 +00:00
[mips][msa] Correct pattern for LSA
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
This commit is contained in:
parent
61a2eb1df5
commit
41e1c04201
@ -2297,8 +2297,8 @@ class LSA_DESC {
|
|||||||
dag OutOperandList = (outs GPR32Opnd:$rd);
|
dag OutOperandList = (outs GPR32Opnd:$rd);
|
||||||
dag InOperandList = (ins GPR32Opnd:$rs, GPR32Opnd:$rt, LSAImm:$sa);
|
dag InOperandList = (ins GPR32Opnd:$rs, GPR32Opnd:$rt, LSAImm:$sa);
|
||||||
string AsmString = "lsa\t$rd, $rs, $rt, $sa";
|
string AsmString = "lsa\t$rd, $rs, $rt, $sa";
|
||||||
list<dag> Pattern = [(set GPR32Opnd:$rd, (add GPR32Opnd:$rs,
|
list<dag> Pattern = [(set GPR32Opnd:$rd, (add GPR32Opnd:$rt,
|
||||||
(shl GPR32Opnd:$rt,
|
(shl GPR32Opnd:$rs,
|
||||||
immZExt2Lsa:$sa)))];
|
immZExt2Lsa:$sa)))];
|
||||||
InstrItinClass Itinerary = NoItinerary;
|
InstrItinClass Itinerary = NoItinerary;
|
||||||
}
|
}
|
||||||
|
@ -11,7 +11,7 @@ entry:
|
|||||||
declare i32 @llvm.mips.lsa(i32, i32, i32) nounwind
|
declare i32 @llvm.mips.lsa(i32, i32, i32) nounwind
|
||||||
|
|
||||||
; CHECK: llvm_mips_lsa_test:
|
; CHECK: llvm_mips_lsa_test:
|
||||||
; CHECK: lsa {{\$[0-9]+}}, {{\$[0-9]+}}, {{\$[0-9]+}}, 2
|
; CHECK: lsa {{\$[0-9]+}}, $5, $4, 2
|
||||||
; CHECK: .size llvm_mips_lsa_test
|
; CHECK: .size llvm_mips_lsa_test
|
||||||
|
|
||||||
define i32 @lsa_test(i32 %a, i32 %b) nounwind {
|
define i32 @lsa_test(i32 %a, i32 %b) nounwind {
|
||||||
@ -22,5 +22,5 @@ entry:
|
|||||||
}
|
}
|
||||||
|
|
||||||
; CHECK: lsa_test:
|
; CHECK: lsa_test:
|
||||||
; CHECK: lsa {{\$[0-9]+}}, {{\$[0-9]+}}, {{\$[0-9]+}}, 2
|
; CHECK: lsa {{\$[0-9]+}}, $5, $4, 2
|
||||||
; CHECK: .size lsa_test
|
; CHECK: .size lsa_test
|
||||||
|
Loading…
Reference in New Issue
Block a user