[llvm] r176863 - Small fix for cost analysis of ptrtoint.
Patrik Hagglund
patrik.h.hagglund at ericsson.com
Tue Mar 12 06:18:30 PDT 2013
Author: patha
Date: Tue Mar 12 08:18:30 2013
New Revision: 176863
URL: http://llvm.org/viewvc/llvm-project?rev=176863&view=rev
Log:
Small fix for cost analysis of ptrtoint.
This seems to be a "copy-paste error" introducecd in r156140.
Modified:
llvm/trunk/lib/Analysis/TargetTransformInfo.cpp
Modified: llvm/trunk/lib/Analysis/TargetTransformInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/TargetTransformInfo.cpp?rev=176863&r1=176862&r2=176863&view=diff
==============================================================================
--- llvm/trunk/lib/Analysis/TargetTransformInfo.cpp (original)
+++ llvm/trunk/lib/Analysis/TargetTransformInfo.cpp Tue Mar 12 08:18:30 2013
@@ -263,8 +263,8 @@ struct NoTTI : ImmutablePass, TargetTran
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.
More information about the llvm-commits
mailing list