summaryrefslogtreecommitdiff
path: root/lib/Target/Alpha
diff options
context:
space:
mode:
authorAndrew Lenharth <andrewl@lenharth.org>2006-04-06 21:26:32 +0000
committerAndrew Lenharth <andrewl@lenharth.org>2006-04-06 21:26:32 +0000
commit253b9e775045e19b3ad9bc56a4ca656e2b21a46a (patch)
tree3f3df74463023c5d9ebe7a37a29e02312849c577 /lib/Target/Alpha
parent4ff88929725bdf081d41c3f5387405127e40ac5f (diff)
downloadllvm-253b9e775045e19b3ad9bc56a4ca656e2b21a46a.tar.gz
llvm-253b9e775045e19b3ad9bc56a4ca656e2b21a46a.tar.bz2
llvm-253b9e775045e19b3ad9bc56a4ca656e2b21a46a.tar.xz
fix some linking problems with the new gcc
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27460 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/Alpha')
-rw-r--r--lib/Target/Alpha/AlphaISelLowering.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/Target/Alpha/AlphaISelLowering.cpp b/lib/Target/Alpha/AlphaISelLowering.cpp
index a87647ce70..8f56b76c79 100644
--- a/lib/Target/Alpha/AlphaISelLowering.cpp
+++ b/lib/Target/Alpha/AlphaISelLowering.cpp
@@ -571,7 +571,7 @@ SDOperand AlphaTargetLowering::LowerOperation(SDOperand Op, SelectionDAG &DAG) {
GlobalValue *GV = GSDN->getGlobal();
SDOperand GA = DAG.getTargetGlobalAddress(GV, MVT::i64, GSDN->getOffset());
- if (!GV->hasWeakLinkage() && !GV->isExternal()) {
+ if (!GV->hasWeakLinkage() && !GV->isExternal() && !GV->hasLinkOnceLinkage()) {
SDOperand Hi = DAG.getNode(AlphaISD::GPRelHi, MVT::i64, GA,
DAG.getNode(AlphaISD::GlobalBaseReg, MVT::i64));
SDOperand Lo = DAG.getNode(AlphaISD::GPRelLo, MVT::i64, GA, Hi);
@@ -602,6 +602,8 @@ SDOperand AlphaTargetLowering::LowerOperation(SDOperand Op, SelectionDAG &DAG) {
case ISD::SDIV:
case ISD::UDIV:
if (MVT::isInteger(Op.getValueType())) {
+ if (Op.getOperand(1).getOpcode() == ISD::Constant)
+ return Op.getOpcode() == ISD::SDIV ? BuildSDIVSequence(Op, &DAG) : BuildUDIVSequence(Op, &DAG);
const char* opstr = 0;
switch(Op.getOpcode()) {
case ISD::UREM: opstr = "__remqu"; break;