mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-04-11 16:37:42 +00:00
SimplifyCFG: Don't assume non-null ScalarTargetTransformInfo.
Patch by Pekka Jääskeläinen! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168176 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
1358841e91
commit
6eac2ba4de
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user