mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2026-04-27 04:18:42 +00:00
Merge r168176 from trunk:
SimplifyCFG: Don't assume non-null ScalarTargetTransformInfo. Patch by Pekka Jääskeläinen! git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_32@168194 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
1 parent
1f7de172b4
commit
aab71049df
1 file changed
+2
-1
@@ -3539,7 +3539,8 @@ static bool SwitchToLookupTable(SwitchInst *SI,
|
||||
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
|
||||
|
||||
Reference in new issue
Block a user