mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-12-24 12:36:30 +00:00
Small fix for cost analysis of ptrtoint.
This seems to be a "copy-paste error" introducecd in r156140. llvm-svn: 176863
This commit is contained in:
parent
a2c0b21d7a
commit
59ed19cabd
@ -263,8 +263,8 @@ struct NoTTI : ImmutablePass, TargetTransformInfo {
|
||||
case Instruction::PtrToInt:
|
||||
// A ptrtoint cast is free so long as the result is large enough to store
|
||||
// the pointer, and a legal integer type.
|
||||
if (DL && DL->isLegalInteger(OpTy->getScalarSizeInBits()) &&
|
||||
OpTy->getScalarSizeInBits() >= DL->getPointerSizeInBits())
|
||||
if (DL && DL->isLegalInteger(Ty->getScalarSizeInBits()) &&
|
||||
Ty->getScalarSizeInBits() >= DL->getPointerSizeInBits())
|
||||
return TCC_Free;
|
||||
|
||||
// Otherwise it's not a no-op.
|
||||
|
Loading…
Reference in New Issue
Block a user