[llvm-commits] [llvm] r90815 - /llvm/trunk/lib/CodeGen/MachineInstr.cpp
Evan Cheng
evan.cheng at apple.com
Mon Dec 7 15:10:34 PST 2009
Author: evancheng
Date: Mon Dec 7 17:10:34 2009
New Revision: 90815
URL: http://llvm.org/viewvc/llvm-project?rev=90815&view=rev
Log:
Follow up to 90488. Turn a check into an assertion.
Modified:
llvm/trunk/lib/CodeGen/MachineInstr.cpp
Modified: llvm/trunk/lib/CodeGen/MachineInstr.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/MachineInstr.cpp?rev=90815&r1=90814&r2=90815&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/MachineInstr.cpp (original)
+++ llvm/trunk/lib/CodeGen/MachineInstr.cpp Mon Dec 7 17:10:34 2009
@@ -1064,8 +1064,8 @@
unsigned MachineInstr::isConstantValuePHI() const {
if (getOpcode() != TargetInstrInfo::PHI)
return 0;
- if (getNumOperands() <= 1)
- return 0;
+ assert(getNumOperands() >= 3 &&
+ "It's illegal to have a PHI without source operands");
unsigned Reg = getOperand(1).getReg();
for (unsigned i = 3, e = getNumOperands(); i < e; i += 2)
More information about the llvm-commits
mailing list