mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-04-07 01:38:26 +00:00
Add support for a simple constantexpr: cast of one ptr type to another
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5829 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
2719bac905
commit
4b12cdec01
@ -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";
|
||||
|
@ -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…
x
Reference in New Issue
Block a user