commit | aa2617206f0a8a919f1fa9475b129b7ecebe8eb4 | [log] [tgz] |
---|---|---|
author | Gabor Greif <ggreif@gmail.com> | Tue Feb 26 19:13:21 2008 +0000 |
committer | Gabor Greif <ggreif@gmail.com> | Tue Feb 26 19:13:21 2008 +0000 |
tree | 458d5513723ba218ce734f0ec36feb0262016265 | |
parent | 85e38bfb2e7113dec3eed8b4514f722681bee240 [diff] [blame] |
fix http://llvm.org/bugs/show_bug.cgi?id=2097 llvm-svn: 47615
diff --git a/llvm/lib/Transforms/Scalar/CodeGenPrepare.cpp b/llvm/lib/Transforms/Scalar/CodeGenPrepare.cpp index 15ccbbd..d8b82b3 100644 --- a/llvm/lib/Transforms/Scalar/CodeGenPrepare.cpp +++ b/llvm/lib/Transforms/Scalar/CodeGenPrepare.cpp
@@ -991,7 +991,7 @@ 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