summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Analysis
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
commit3eaa4b932a74ce6de2ee12d4cac3c48f1056f790 (patch)
treeb0e5bc00024d19ab62f35acc4b657117b507efda /llvm/lib/Analysis
parentba6f3221d635ff182c0e03b71c7dfe206657acea (diff)
downloadbcm5719-llvm-3eaa4b932a74ce6de2ee12d4cac3c48f1056f790.tar.gz
bcm5719-llvm-3eaa4b932a74ce6de2ee12d4cac3c48f1056f790.zip
Small fix for cost analysis of ptrtoint.
This seems to be a "copy-paste error" introducecd in r156140. llvm-svn: 176863
Diffstat (limited to 'llvm/lib/Analysis')
-rw-r--r--llvm/lib/Analysis/TargetTransformInfo.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/Analysis/TargetTransformInfo.cpp b/llvm/lib/Analysis/TargetTransformInfo.cpp
index 72421a00c76..976cd873213 100644
--- a/llvm/lib/Analysis/TargetTransformInfo.cpp
+++ b/llvm/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.
OpenPOWER on IntegriCloud