From: Chris Lattner Date: Tue, 21 Oct 2003 16:29:23 +0000 (+0000) Subject: Fix preselection/lowerswitches bug X-Git-Url: http://plrg.eecs.uci.edu/git/?a=commitdiff_plain;h=ff3d5d97026f957924e9a74ae14363a30da742a4;p=oota-llvm.git Fix preselection/lowerswitches bug git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9333 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Target/SparcV9/SparcV9InstrInfo.cpp b/lib/Target/SparcV9/SparcV9InstrInfo.cpp index 0a3ccc84e83..2d872314e9a 100644 --- a/lib/Target/SparcV9/SparcV9InstrInfo.cpp +++ b/lib/Target/SparcV9/SparcV9InstrInfo.cpp @@ -431,6 +431,9 @@ UltraSparcInstrInfo::ConstantMayNotFitInImmedField(const Constant* CV, if (isa(CV)) // can always use %g0 return false; + if (isa(I)) // Switch instructions will be lowered! + return false; + if (const ConstantInt* CI = dyn_cast(CV)) return labs((int64_t)CI->getRawValue()) > MaxConstantsTable[I->getOpcode()];