[llvm-commits] CVS: llvm/lib/Target/Alpha/AlphaAsmPrinter.cpp AlphaISelPattern.cpp

Andrew Lenharth alenhar2 at cs.uiuc.edu
Tue Jan 25 11:58:53 PST 2005



Changes in directory llvm/lib/Target/Alpha:

AlphaAsmPrinter.cpp updated: 1.2 -> 1.3
AlphaISelPattern.cpp updated: 1.3 -> 1.4
---
Log message:

problems with bools, and their work arounds

---
Diffs of the changes:  (+14 -4)

 AlphaAsmPrinter.cpp  |    2 +-
 AlphaISelPattern.cpp |   16 +++++++++++++---
 2 files changed, 14 insertions(+), 4 deletions(-)


Index: llvm/lib/Target/Alpha/AlphaAsmPrinter.cpp
diff -u llvm/lib/Target/Alpha/AlphaAsmPrinter.cpp:1.2 llvm/lib/Target/Alpha/AlphaAsmPrinter.cpp:1.3
--- llvm/lib/Target/Alpha/AlphaAsmPrinter.cpp:1.2	Mon Jan 24 12:37:48 2005
+++ llvm/lib/Target/Alpha/AlphaAsmPrinter.cpp	Tue Jan 25 13:58:40 2005
@@ -164,7 +164,7 @@
 
   if (CurrentFnName.compare("main") == 0)
     {
-      O << "\n\n#HACK\n\t.text\n\t.ent __main\n__main:\n\tret $31,($26),1\n\t.end __main\n#ENDHACK\n\n";
+      //      O << "\n\n#HACK\n\t.text\n\t.ent __main\n__main:\n\tret $31,($26),1\n\t.end __main\n#ENDHACK\n\n";
     }
 
   // Print out constants referenced by the function


Index: llvm/lib/Target/Alpha/AlphaISelPattern.cpp
diff -u llvm/lib/Target/Alpha/AlphaISelPattern.cpp:1.3 llvm/lib/Target/Alpha/AlphaISelPattern.cpp:1.4
--- llvm/lib/Target/Alpha/AlphaISelPattern.cpp:1.3	Mon Jan 24 18:35:34 2005
+++ llvm/lib/Target/Alpha/AlphaISelPattern.cpp	Tue Jan 25 13:58:40 2005
@@ -42,8 +42,6 @@
       addRegisterClass(MVT::f64, Alpha::FPRCRegisterClass);
 
       setOperationAction(ISD::EXTLOAD          , MVT::i1   , Expand);
-      setOperationAction(ISD::EXTLOAD          , MVT::i8   , Expand);
-      setOperationAction(ISD::EXTLOAD          , MVT::i16  , Expand);
 
       setOperationAction(ISD::ZEXTLOAD         , MVT::i1   , Expand);
       setOperationAction(ISD::ZEXTLOAD         , MVT::i32  , Expand);
@@ -319,7 +317,17 @@
     case MVT::i64:
       switch (cast<MVTSDNode>(Node)->getExtraValueType()) {
       default:
-        assert(0 && "Bad sign extend!");
+	std::cerr << cast<MVTSDNode>(Node)->getExtraValueType() 
+		  << "(i1 is " << MVT::i1 
+		  << " i8 is " << MVT::i8
+		  << " i16 is " << MVT::i16
+		  << " i32 is " << MVT::i32
+		  << " i64 is " << MVT::i64
+		  << ")\n";
+        assert(0 && "Bad extend load!");
+      case MVT::i64:
+	BuildMI(BB, Alpha::LDQ, 2, Result).addImm(0).addReg(Tmp1);
+	break;
       case MVT::i32:
 	BuildMI(BB, Alpha::LDL, 2, Result).addImm(0).addReg(Tmp1);
         break;
@@ -327,6 +335,7 @@
 	BuildMI(BB, Alpha::LDWU, 2, Result).addImm(0).addReg(Tmp1);
         break;
       case MVT::i8:
+      case MVT::i1: //FIXME: DAG does not expand i8??
 	BuildMI(BB, Alpha::LDBU, 2, Result).addImm(0).addReg(Tmp1);
         break;
       }
@@ -822,6 +831,7 @@
 
     switch (StoredTy) {
     default: assert(0 && "Unhandled Type"); break;
+    case MVT::i1: //FIXME: DAG does not promote this load
     case MVT::i8: Opc = Alpha::STB; break;
     case MVT::i16: Opc = Alpha::STW; break;
     case MVT::i32: Opc = Alpha::STL; break;






More information about the llvm-commits mailing list