mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-09-11 08:29:25 +00:00
Add some cleanup to the DataLayout changes requested by Chandler.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166607 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -937,8 +937,7 @@ Constant *llvm::ConstantFoldInstOperands(unsigned Opcode, Type *DestTy,
|
||||
// pointer, so it can't be done in ConstantExpr::getCast.
|
||||
if (ConstantExpr *CE = dyn_cast<ConstantExpr>(Ops[0]))
|
||||
if (TD && CE->getOpcode() == Instruction::PtrToInt &&
|
||||
TD->getPointerSizeInBits(
|
||||
cast<PointerType>(CE->getOperand(0)->getType())->getAddressSpace())
|
||||
TD->getTypeSizeInBits(CE->getOperand(0)->getType())
|
||||
<= CE->getType()->getScalarSizeInBits())
|
||||
return FoldBitCast(CE->getOperand(0), DestTy, *TD);
|
||||
|
||||
|
Reference in New Issue
Block a user