[llvm] r195401 - Fix a typo where we were creating <def, kill> operands instead of
Lang Hames
lhames at gmail.com
Thu Nov 21 16:46:33 PST 2013
Author: lhames
Date: Thu Nov 21 18:46:32 2013
New Revision: 195401
URL: http://llvm.org/viewvc/llvm-project?rev=195401&view=rev
Log:
Fix a typo where we were creating <def,kill> operands instead of
<def,dead> ones.
Add an assertion to make sure we catch this in the future.
Fixes <rdar://problem/15464559>.
Modified:
llvm/trunk/include/llvm/CodeGen/MachineOperand.h
llvm/trunk/lib/Target/ARM/ARMBaseInstrInfo.cpp
Modified: llvm/trunk/include/llvm/CodeGen/MachineOperand.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/CodeGen/MachineOperand.h?rev=195401&r1=195400&r2=195401&view=diff
==============================================================================
--- llvm/trunk/include/llvm/CodeGen/MachineOperand.h (original)
+++ llvm/trunk/include/llvm/CodeGen/MachineOperand.h Thu Nov 21 18:46:32 2013
@@ -564,6 +564,8 @@ public:
unsigned SubReg = 0,
bool isDebug = false,
bool isInternalRead = false) {
+ assert(!(isDead && !isDef) && "Dead flag on non-def");
+ assert(!(isKill && isDef) && "Kill flag on def");
MachineOperand Op(MachineOperand::MO_Register);
Op.IsDef = isDef;
Op.IsImp = isImp;
Modified: llvm/trunk/lib/Target/ARM/ARMBaseInstrInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/ARMBaseInstrInfo.cpp?rev=195401&r1=195400&r2=195401&view=diff
==============================================================================
--- llvm/trunk/lib/Target/ARM/ARMBaseInstrInfo.cpp (original)
+++ llvm/trunk/lib/Target/ARM/ARMBaseInstrInfo.cpp Thu Nov 21 18:46:32 2013
@@ -1934,7 +1934,8 @@ bool llvm::tryFoldSPUpdateIntoPushPop(Ma
return false;
// Mark the unimportant registers as <def,dead> in the POP.
- RegList.push_back(MachineOperand::CreateReg(CurReg, true, false, true));
+ RegList.push_back(MachineOperand::CreateReg(CurReg, true, false, false,
+ true));
}
if (RegsNeeded > 0)
More information about the llvm-commits
mailing list