diff options
author | Chris Lattner <sabre@nondot.org> | 2003-10-21 16:29:23 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2003-10-21 16:29:23 +0000 |
commit | a62228d01a9cf1346445a2cf2bef19f1b3a9cd62 (patch) | |
tree | 5889d9835863782bcbdc5b4e574b6145de195bf8 /llvm/lib/Target/Sparc | |
parent | 4439aee50410a587567b540decfc46b9909e5c95 (diff) | |
download | bcm5719-llvm-a62228d01a9cf1346445a2cf2bef19f1b3a9cd62.tar.gz bcm5719-llvm-a62228d01a9cf1346445a2cf2bef19f1b3a9cd62.zip |
Fix preselection/lowerswitches bug
llvm-svn: 9333
Diffstat (limited to 'llvm/lib/Target/Sparc')
-rw-r--r-- | llvm/lib/Target/Sparc/SparcInstrInfo.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/llvm/lib/Target/Sparc/SparcInstrInfo.cpp b/llvm/lib/Target/Sparc/SparcInstrInfo.cpp index 0a3ccc84e83..2d872314e9a 100644 --- a/llvm/lib/Target/Sparc/SparcInstrInfo.cpp +++ b/llvm/lib/Target/Sparc/SparcInstrInfo.cpp @@ -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()]; |