From ff3d5d97026f957924e9a74ae14363a30da742a4 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Tue, 21 Oct 2003 16:29:23 +0000 Subject: Fix preselection/lowerswitches bug git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9333 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Target/SparcV9/SparcV9InstrInfo.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'lib') diff --git a/lib/Target/SparcV9/SparcV9InstrInfo.cpp b/lib/Target/SparcV9/SparcV9InstrInfo.cpp index 0a3ccc84e8..2d872314e9 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()]; -- cgit v1.2.3