Author: evancheng
Date: Fri Oct 26 12:24:46 2007
New Revision: 43384
URL: http://llvm.org/viewvc/llvm-project?rev=43384&view=rev
Log:
Fix a crash. Make sure TLI is not null.
Modified:
llvm/trunk/lib/Transforms/Scalar/LoopStrengthReduce.cpp
Modified: llvm/trunk/lib/Transforms/Scalar/LoopStrengthReduce.cpp
URL:
http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/LoopStrengthReduce.cpp?rev=43384&r1=43383&r2=43384&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Scalar/LoopStrengthReduce.cpp (original)
+++ llvm/trunk/lib/Transforms/Scalar/LoopStrengthReduce.cpp Fri Oct 26 12:24:46
2007
@@ -972,7 +972,7 @@
AM.Scale = Scale;
// If load[imm+r*scale] is illegal, bail out.
- if (!TLI->isLegalAddressingMode(AM, AccessTy))
+ if (TLI && !TLI->isLegalAddressingMode(AM, AccessTy))
return false;
}
return true;
_______________________________________________
llvm-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits