[llvm-commits] [llvm] r55431 - /llvm/trunk/lib/CodeGen/SelectionDAG/FastISel.cpp
Dan Gohman
gohman at apple.com
Wed Aug 27 13:41:38 PDT 2008
Author: djg
Date: Wed Aug 27 15:41:38 2008
New Revision: 55431
URL: http://llvm.org/viewvc/llvm-project?rev=55431&view=rev
Log:
Fix FastISel's bitcast code for the case where getRegForValue fails.
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=55431&r1=55430&r2=55431&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/SelectionDAG/FastISel.cpp (original)
+++ llvm/trunk/lib/CodeGen/SelectionDAG/FastISel.cpp Wed Aug 27 15:41:38 2008
@@ -226,7 +226,10 @@
DenseMap<const Value*, unsigned> &ValueMap) {
// If the bitcast doesn't change the type, just use the operand value.
if (I->getType() == I->getOperand(0)->getType()) {
- ValueMap[I] = getRegForValue(I->getOperand(0), ValueMap);
+ unsigned Reg = getRegForValue(I->getOperand(0), ValueMap);
+ if (Reg == 0)
+ return false;
+ ValueMap[I] = Reg;
return true;
}
More information about the llvm-commits
mailing list