[llvm-commits] CVS: llvm/lib/Target/Alpha/AlphaISelPattern.cpp AlphaInstrInfo.td
Andrew Lenharth
alenhar2 at cs.uiuc.edu
Tue Feb 1 19:36:50 PST 2005
Changes in directory llvm/lib/Target/Alpha:
AlphaISelPattern.cpp updated: 1.24 -> 1.25
AlphaInstrInfo.td updated: 1.14 -> 1.15
---
Log message:
try to make a bug bugpointable, add yet more constant pool stuff, fixup constant loads for FP
---
Diffs of the changes: (+19 -13)
AlphaISelPattern.cpp | 30 ++++++++++++++++++------------
AlphaInstrInfo.td | 2 +-
2 files changed, 19 insertions(+), 13 deletions(-)
Index: llvm/lib/Target/Alpha/AlphaISelPattern.cpp
diff -u llvm/lib/Target/Alpha/AlphaISelPattern.cpp:1.24 llvm/lib/Target/Alpha/AlphaISelPattern.cpp:1.25
--- llvm/lib/Target/Alpha/AlphaISelPattern.cpp:1.24 Tue Feb 1 18:51:15 2005
+++ llvm/lib/Target/Alpha/AlphaISelPattern.cpp Tue Feb 1 21:36:35 2005
@@ -351,7 +351,7 @@
{
Select(Chain);
AlphaLowering.restoreGP(BB);
- Opc = DestType == MVT::f64 ? Alpha::LDS : Alpha::LDT;
+ Opc = DestType == MVT::f64 ? Alpha::LDS_SYM : Alpha::LDT_SYM;
BuildMI(BB, Opc, 1, Result).addGlobalAddress(cast<GlobalAddressSDNode>(Address)->getGlobal());
}
else if (ConstantPoolSDNode *CP = dyn_cast<ConstantPoolSDNode>(Address)) {
@@ -1046,19 +1046,25 @@
SDOperand Chain = N.getOperand(0);
SDOperand Address = N.getOperand(1);
+ assert(DestType == MVT::i64 && "unknown Load dest type");
+
if (Address.getOpcode() == ISD::GlobalAddress)
- {
- Select(Chain);
- AlphaLowering.restoreGP(BB);
- BuildMI(BB, Alpha::LOAD, 1, Result).addGlobalAddress(cast<GlobalAddressSDNode>(Address)->getGlobal());
- }
+ {
+ Select(Chain);
+ AlphaLowering.restoreGP(BB);
+ BuildMI(BB, Alpha::LOAD, 1, Result).addGlobalAddress(cast<GlobalAddressSDNode>(Address)->getGlobal());
+ }
+ else if (ConstantPoolSDNode *CP = dyn_cast<ConstantPoolSDNode>(Address)) {
+ AlphaLowering.restoreGP(BB);
+ BuildMI(BB, Alpha::LOAD, 1, Result).addConstantPoolIndex(CP->getIndex());
+ }
else
- {
- Select(Chain);
- Tmp2 = SelectExpr(Address);
- BuildMI(BB, Alpha::LDQ, 2, Result).addImm(0).addReg(Tmp2);
- }
- return Result;
+ {
+ Select(Chain);
+ Tmp2 = SelectExpr(Address);
+ BuildMI(BB, Alpha::LDQ, 2, Result).addImm(0).addReg(Tmp2);
+ }
+ return Result;
}
}
Index: llvm/lib/Target/Alpha/AlphaInstrInfo.td
diff -u llvm/lib/Target/Alpha/AlphaInstrInfo.td:1.14 llvm/lib/Target/Alpha/AlphaInstrInfo.td:1.15
--- llvm/lib/Target/Alpha/AlphaInstrInfo.td:1.14 Tue Feb 1 14:36:44 2005
+++ llvm/lib/Target/Alpha/AlphaInstrInfo.td Tue Feb 1 21:36:35 2005
@@ -266,7 +266,7 @@
def STQ : MForm<0x2D, (ops GPRC:$RA, s16imm:$DISP, GPRC:$RB), "stq $RA,$DISP($RB)">; //Store quadword
//Loads, int
-def LDL : MForm<0x28, (ops GPRC:$RA, s16imm:$DISP, GPRC:$RB), "ldq $RA,$DISP($RB)">; // Load sign-extended longword
+def LDL : MForm<0x28, (ops GPRC:$RA, s16imm:$DISP, GPRC:$RB), "ldl $RA,$DISP($RB)">; // Load sign-extended longword
def LDQ : MForm<0x29, (ops GPRC:$RA, s16imm:$DISP, GPRC:$RB), "ldq $RA,$DISP($RB)">; //Load quadword
def LDBU : MForm<0x0A, (ops GPRC:$RA, s16imm:$DISP, GPRC:$RB), "ldbu $RA,$DISP($RB)">; //Load zero-extended byte
def LDWU : MForm<0x0C, (ops GPRC:$RA, s16imm:$DISP, GPRC:$RB), "ldwu $RA,$DISP($RB)">; //Load zero-extended word
More information about the llvm-commits
mailing list