[Mips] Fix 374055
EXPENSIVE_CHECKS build was failing on new test.
This is fixed by marking $ra register as undef.
Test now has -verify-machineinstrs to check for operand flags.
llvm-svn: 374320
diff --git a/llvm/lib/Target/Mips/MipsSEISelDAGToDAG.cpp b/llvm/lib/Target/Mips/MipsSEISelDAGToDAG.cpp
index 65afb36..c831324 100644
--- a/llvm/lib/Target/Mips/MipsSEISelDAGToDAG.cpp
+++ b/llvm/lib/Target/Mips/MipsSEISelDAGToDAG.cpp
@@ -129,9 +129,9 @@
MachineInstrBuilder MIB(MF, &MI);
if (!Subtarget->isABI_O32()) { // N32, N64
// Save current return address.
- BuildMI(MBB, &MI, MI.getDebugLoc(), TII->get(Mips::OR))
+ BuildMI(MBB, &MI, MI.getDebugLoc(), TII->get(Mips::OR64))
.addDef(Mips::AT_64)
- .addUse(Mips::RA_64)
+ .addUse(Mips::RA_64, RegState::Undef)
.addUse(Mips::ZERO_64);
// Stops instruction above from being removed later on.
MIB.addUse(Mips::AT_64, RegState::Implicit);
@@ -139,7 +139,7 @@
// Save current return address.
BuildMI(MBB, &MI, MI.getDebugLoc(), TII->get(Mips::OR))
.addDef(Mips::AT)
- .addUse(Mips::RA)
+ .addUse(Mips::RA, RegState::Undef)
.addUse(Mips::ZERO);
// _mcount pops 2 words from stack.
BuildMI(MBB, &MI, MI.getDebugLoc(), TII->get(Mips::ADDiu))