diff options
author | Ed Schouten <ed@FreeBSD.org> | 2009-06-22 08:08:12 +0000 |
---|---|---|
committer | Ed Schouten <ed@FreeBSD.org> | 2009-06-22 08:08:12 +0000 |
commit | b2f21fb044b6b5c52cff6227f9f79ca4ed42b18f (patch) | |
tree | 86c1bc482baa6c81fc70b8d715153bfa93377186 /lib/Analysis/ConstantFolding.cpp | |
parent | 600c6fa13de5c407dc36dbb0ab73807868741ae0 (diff) |
Notes
Diffstat (limited to 'lib/Analysis/ConstantFolding.cpp')
-rw-r--r-- | lib/Analysis/ConstantFolding.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/Analysis/ConstantFolding.cpp b/lib/Analysis/ConstantFolding.cpp index 261c635feb4a..5aa4d56c4e67 100644 --- a/lib/Analysis/ConstantFolding.cpp +++ b/lib/Analysis/ConstantFolding.cpp @@ -365,7 +365,7 @@ Constant *llvm::ConstantFoldInstOperands(unsigned Opcode, const Type *DestTy, if (ConstantExpr *CE = dyn_cast<ConstantExpr>(Ops[0])) { if (TD && CE->getOpcode() == Instruction::IntToPtr) { Constant *Input = CE->getOperand(0); - unsigned InWidth = Input->getType()->getPrimitiveSizeInBits(); + unsigned InWidth = Input->getType()->getScalarSizeInBits(); if (TD->getPointerSizeInBits() < InWidth) { Constant *Mask = ConstantInt::get(APInt::getLowBitsSet(InWidth, @@ -384,7 +384,7 @@ Constant *llvm::ConstantFoldInstOperands(unsigned Opcode, const Type *DestTy, if (ConstantExpr *CE = dyn_cast<ConstantExpr>(Ops[0])) { if (TD && TD->getPointerSizeInBits() <= - CE->getType()->getPrimitiveSizeInBits()) { + CE->getType()->getScalarSizeInBits()) { if (CE->getOpcode() == Instruction::PtrToInt) { Constant *Input = CE->getOperand(0); Constant *C = FoldBitCast(Input, DestTy, *TD); |