projects
/
platform
/
upstream
/
llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4439aee
)
Fix preselection/lowerswitches bug
author
Chris Lattner
<sabre@nondot.org>
Tue, 21 Oct 2003 16:29:23 +0000
(16:29 +0000)
committer
Chris Lattner
<sabre@nondot.org>
Tue, 21 Oct 2003 16:29:23 +0000
(16:29 +0000)
llvm-svn: 9333
llvm/lib/Target/Sparc/SparcInstrInfo.cpp
patch
|
blob
|
history
diff --git
a/llvm/lib/Target/Sparc/SparcInstrInfo.cpp
b/llvm/lib/Target/Sparc/SparcInstrInfo.cpp
index
0a3ccc8
..
2d87231
100644
(file)
--- 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()];