[llvm-commits] [llvm] r55026 - /llvm/trunk/lib/CodeGen/SelectionDAG/FastISel.cpp
Dan Gohman
gohman at apple.com
Tue Aug 19 17:35:17 PDT 2008
Author: djg
Date: Tue Aug 19 19:35:17 2008
New Revision: 55026
URL: http://llvm.org/viewvc/llvm-project?rev=55026&view=rev
Log:
Fix FastISel to recognize unhandled operands, such as constants
that aren't available as virtual registers (for now).
Modified:
llvm/trunk/lib/CodeGen/SelectionDAG/FastISel.cpp
Modified: llvm/trunk/lib/CodeGen/SelectionDAG/FastISel.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/FastISel.cpp?rev=55026&r1=55025&r2=55026&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/SelectionDAG/FastISel.cpp (original)
+++ llvm/trunk/lib/CodeGen/SelectionDAG/FastISel.cpp Tue Aug 19 19:35:17 2008
@@ -25,6 +25,10 @@
DenseMap<const Value*, unsigned> &ValueMap) {
unsigned Op0 = ValueMap[I->getOperand(0)];
unsigned Op1 = ValueMap[I->getOperand(1)];
+ if (Op0 == 0 || Op1 == 0)
+ // Unhandled operand. Halt "fast" selection and bail.
+ return false;
+
MVT VT = MVT::getMVT(I->getType(), /*HandleUnknown=*/true);
if (VT == MVT::Other || !VT.isSimple())
// Unhandled type. Halt "fast" selection and bail.
More information about the llvm-commits
mailing list