mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-08-17 05:29:24 +00:00
Fix FastISel's bitcast code for the case where getRegForValue fails.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55431 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
df3b99381f
commit
a318dabc0e
@ -226,7 +226,10 @@ bool FastISel::SelectBitCast(Instruction *I,
|
||||
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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user