mirror of
https://github.com/RPCSX/llvm.git
synced 2025-02-02 18:42:36 +00:00
Fix preselection/lowerswitches bug
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9333 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
4c62e79c59
commit
ff3d5d9702
@ -431,6 +431,9 @@ UltraSparcInstrInfo::ConstantMayNotFitInImmedField(const Constant* CV,
|
|||||||
if (isa<ConstantPointerNull>(CV)) // can always use %g0
|
if (isa<ConstantPointerNull>(CV)) // can always use %g0
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
|
if (isa<SwitchInst>(I)) // Switch instructions will be lowered!
|
||||||
|
return false;
|
||||||
|
|
||||||
if (const ConstantInt* CI = dyn_cast<ConstantInt>(CV))
|
if (const ConstantInt* CI = dyn_cast<ConstantInt>(CV))
|
||||||
return labs((int64_t)CI->getRawValue()) > MaxConstantsTable[I->getOpcode()];
|
return labs((int64_t)CI->getRawValue()) > MaxConstantsTable[I->getOpcode()];
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user