[llvm-branch-commits] [llvm-branch] r168194 - /llvm/branches/release_32/lib/Transforms/Utils/SimplifyCFG.cpp
Hans Wennborg
hans at hanshq.net
Fri Nov 16 12:26:47 PST 2012
Author: hans
Date: Fri Nov 16 14:26:47 2012
New Revision: 168194
URL: http://llvm.org/viewvc/llvm-project?rev=168194&view=rev
Log:
Merge r168176 from trunk:
SimplifyCFG: Don't assume non-null ScalarTargetTransformInfo.
Patch by Pekka Jääskeläinen!
Modified:
llvm/branches/release_32/lib/Transforms/Utils/SimplifyCFG.cpp
Modified: llvm/branches/release_32/lib/Transforms/Utils/SimplifyCFG.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/branches/release_32/lib/Transforms/Utils/SimplifyCFG.cpp?rev=168194&r1=168193&r2=168194&view=diff
==============================================================================
--- llvm/branches/release_32/lib/Transforms/Utils/SimplifyCFG.cpp (original)
+++ llvm/branches/release_32/lib/Transforms/Utils/SimplifyCFG.cpp Fri Nov 16 14:26:47 2012
@@ -3539,7 +3539,8 @@
assert(SI->getNumCases() > 1 && "Degenerate switch?");
// Only build lookup table when we have a target that supports it.
- if (!TTI || !TTI->getScalarTargetTransformInfo()->shouldBuildLookupTables())
+ if (!TTI || !TTI->getScalarTargetTransformInfo() ||
+ !TTI->getScalarTargetTransformInfo()->shouldBuildLookupTables())
return false;
// FIXME: If the switch is too sparse for a lookup table, perhaps we could
More information about the llvm-branch-commits
mailing list