From aa2617206f0a8a919f1fa9475b129b7ecebe8eb4 Mon Sep 17 00:00:00 2001 From: Gabor Greif Date: Tue, 26 Feb 2008 19:13:21 +0000 Subject: fix http://llvm.org/bugs/show_bug.cgi?id=2097 llvm-svn: 47615 --- llvm/lib/Transforms/Scalar/CodeGenPrepare.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'llvm/lib/Transforms') diff --git a/llvm/lib/Transforms/Scalar/CodeGenPrepare.cpp b/llvm/lib/Transforms/Scalar/CodeGenPrepare.cpp index 15ccbbd4204..d8b82b374dc 100644 --- a/llvm/lib/Transforms/Scalar/CodeGenPrepare.cpp +++ b/llvm/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 -- cgit v1.2.3