[PATCH] D21065: [mips][msa] copyPhysReg() should not set RegState::Define on result of CTCMSA.
Daniel Sanders via llvm-commits
llvm-commits at lists.llvm.org
Tue Jun 7 03:55:38 PDT 2016
dsanders created this revision.
dsanders added a reviewer: sdardis.
dsanders added a subscriber: llvm-commits.
Herald added subscribers: sdardis, dsanders.
The machine verifier reports 'Explicit operand marked as def' when it is
manually specified even though it agrees with the operand info.
http://reviews.llvm.org/D21065
Files:
lib/Target/Mips/MipsSEInstrInfo.cpp
test/CodeGen/Mips/msa/elm_cxcmsa.ll
Index: test/CodeGen/Mips/msa/elm_cxcmsa.ll
===================================================================
--- test/CodeGen/Mips/msa/elm_cxcmsa.ll
+++ test/CodeGen/Mips/msa/elm_cxcmsa.ll
@@ -1,8 +1,8 @@
; Test the MSA ctcmsa and cfcmsa intrinsics (which are encoded with the ELM
; instruction format).
-; RUN: llc -march=mips -mattr=+msa,+fp64 < %s | FileCheck %s
-; RUN: llc -march=mipsel -mattr=+msa,+fp64 < %s | FileCheck %s
+; RUN: llc -march=mips -mattr=+msa,+fp64 -verify-machineinstrs < %s | FileCheck %s
+; RUN: llc -march=mipsel -mattr=+msa,+fp64 -verify-machineinstrs < %s | FileCheck %s
define i32 @msa_ir_cfcmsa_test() nounwind {
entry:
Index: lib/Target/Mips/MipsSEInstrInfo.cpp
===================================================================
--- lib/Target/Mips/MipsSEInstrInfo.cpp
+++ lib/Target/Mips/MipsSEInstrInfo.cpp
@@ -129,9 +129,12 @@
.addReg(SrcReg, getKillRegState(KillSrc)).addImm(1 << 4)
.addReg(DestReg, RegState::ImplicitDefine);
return;
+ } else if (Mips::MSACtrlRegClass.contains(DestReg)) {
+ BuildMI(MBB, I, DL, get(Mips::CTCMSA))
+ .addReg(DestReg)
+ .addReg(SrcReg, getKillRegState(KillSrc));
+ return;
}
- else if (Mips::MSACtrlRegClass.contains(DestReg))
- Opc = Mips::CTCMSA;
}
else if (Mips::FGR32RegClass.contains(DestReg, SrcReg))
Opc = Mips::FMOV_S;
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D21065.59861.patch
Type: text/x-patch
Size: 1387 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160607/5a2c134c/attachment.bin>
More information about the llvm-commits
mailing list