mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-24 11:42:57 +01:00
Fix preselection/lowerswitches bug
llvm-svn: 9333
This commit is contained in:
parent
2c063c848d
commit
19f471f002
@ -431,6 +431,9 @@ UltraSparcInstrInfo::ConstantMayNotFitInImmedField(const Constant* CV,
|
||||
if (isa<ConstantPointerNull>(CV)) // can always use %g0
|
||||
return false;
|
||||
|
||||
if (isa<SwitchInst>(I)) // Switch instructions will be lowered!
|
||||
return false;
|
||||
|
||||
if (const ConstantInt* CI = dyn_cast<ConstantInt>(CV))
|
||||
return labs((int64_t)CI->getRawValue()) > MaxConstantsTable[I->getOpcode()];
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user