aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Transforms
diff options
context:
space:
mode:
authorGabor Greif <ggreif@gmail.com>2008-02-26 19:13:21 +0000
committerGabor Greif <ggreif@gmail.com>2008-02-26 19:13:21 +0000
commitad385f18f4f11acd9258819338ce2612711ee29c (patch)
treebe913ea6a222a131ec5c6213ef4bf73f63329dc1 /lib/Transforms
parent32464738ef31666d283fab1e30313c98c2658d58 (diff)
downloadexternal_llvm-ad385f18f4f11acd9258819338ce2612711ee29c.zip
external_llvm-ad385f18f4f11acd9258819338ce2612711ee29c.tar.gz
external_llvm-ad385f18f4f11acd9258819338ce2612711ee29c.tar.bz2
fix http://llvm.org/bugs/show_bug.cgi?id=2097
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47615 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms')
-rw-r--r--lib/Transforms/Scalar/CodeGenPrepare.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Transforms/Scalar/CodeGenPrepare.cpp b/lib/Transforms/Scalar/CodeGenPrepare.cpp
index 15ccbbd..d8b82b3 100644
--- a/lib/Transforms/Scalar/CodeGenPrepare.cpp
+++ b/lib/Transforms/Scalar/CodeGenPrepare.cpp
@@ -991,7 +991,7 @@ bool CodeGenPrepare::OptimizeExtUses(Instruction *I) {
return false;
// Only do this xform if truncating is free.
- if (!TLI->isTruncateFree(I->getType(), Src->getType()))
+ if (TLI && !TLI->isTruncateFree(I->getType(), Src->getType()))
return false;
// Only safe to perform the optimization if the source is also defined in