projects
/
oota-llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4c62e79
)
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)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9333
91177308
-0d34-0410-b5e6-
96231b3b80d8
lib/Target/SparcV9/SparcV9InstrInfo.cpp
patch
|
blob
|
history
diff --git
a/lib/Target/SparcV9/SparcV9InstrInfo.cpp
b/lib/Target/SparcV9/SparcV9InstrInfo.cpp
index 0a3ccc84e837b88dced8a126bc00cb24afb9801c..2d872314e9a3a6c018b1c1e52b7abb204f0e976a 100644
(file)
--- a/
lib/Target/SparcV9/SparcV9InstrInfo.cpp
+++ b/
lib/Target/SparcV9/SparcV9InstrInfo.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()];