forked from OSchip/llvm-project
Add support for a simple constantexpr: cast of one ptr type to another
llvm-svn: 5829
This commit is contained in:
parent
4522f446c1
commit
5b348718df
|
@ -307,6 +307,11 @@ void ISel::copyConstantToRegister(MachineBasicBlock *MBB,
|
|||
emitGEPOperation(MBB, IP, CE->getOperand(0),
|
||||
CE->op_begin()+1, CE->op_end(), R);
|
||||
return;
|
||||
} else if (CE->getOpcode() == Instruction::Cast &&
|
||||
isa<PointerType>(CE->getType()) &&
|
||||
isa<PointerType>(CE->getOperand(0)->getType())) {
|
||||
copyConstantToRegister(MBB, IP, cast<Constant>(CE->getOperand(0)), R);
|
||||
return;
|
||||
}
|
||||
|
||||
std::cerr << "Offending expr: " << C << "\n";
|
||||
|
|
Loading…
Reference in New Issue