aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatrik Hagglund <patrik.h.hagglund@ericsson.com>2013-03-12 13:18:30 +0000
committerPatrik Hagglund <patrik.h.hagglund@ericsson.com>2013-03-12 13:18:30 +0000
commitac5b3915aa64d287057752c2c90cfe04adacfa11 (patch)
treec26237efb1a763cb537cf80b956a45c237623154
parent775a266415e293c4e5ab1ed3e006823bba68a872 (diff)
Small fix for cost analysis of ptrtoint.
This seems to be a "copy-paste error" introducecd in r156140. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176863 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--lib/Analysis/TargetTransformInfo.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/Analysis/TargetTransformInfo.cpp b/lib/Analysis/TargetTransformInfo.cpp
index 72421a00c7..976cd87321 100644
--- a/lib/Analysis/TargetTransformInfo.cpp
+++ b/lib/Analysis/TargetTransformInfo.cpp
@@ -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.