[llvm-commits] [llvm] r65221 - /llvm/branches/Apple/Dib/lib/Target/X86/X86ISelLowering.cpp

Bill Wendling isanbard at gmail.com
Fri Feb 20 20:21:10 PST 2009


Author: void
Date: Fri Feb 20 22:21:04 2009
New Revision: 65221

URL: http://llvm.org/viewvc/llvm-project?rev=65221&view=rev
Log:
Partial merge to make Dib build again. A patch or two is missing.

Modified:
    llvm/branches/Apple/Dib/lib/Target/X86/X86ISelLowering.cpp

Modified: llvm/branches/Apple/Dib/lib/Target/X86/X86ISelLowering.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/branches/Apple/Dib/lib/Target/X86/X86ISelLowering.cpp?rev=65221&r1=65220&r2=65221&view=diff

==============================================================================
--- llvm/branches/Apple/Dib/lib/Target/X86/X86ISelLowering.cpp (original)
+++ llvm/branches/Apple/Dib/lib/Target/X86/X86ISelLowering.cpp Fri Feb 20 22:21:04 2009
@@ -986,11 +986,11 @@
     
     // Returns in ST0/ST1 are handled specially: these are pushed as operands to
     // the RET instruction and handled by the FP Stackifier.
-    if (RVLocs[i].getLocReg() == X86::ST0 ||
-        RVLocs[i].getLocReg() == X86::ST1) {
+    if (VA.getLocReg() == X86::ST0 ||
+        VA.getLocReg() == X86::ST1) {
       // If this is a copy from an xmm register to ST(0), use an FPExtend to
       // change the value to the FP stack register class.
-      if (isScalarFPTypeInSSEReg(RVLocs[i].getValVT()))
+      if (isScalarFPTypeInSSEReg(VA.getValVT()))
         ValToCopy = DAG.getNode(ISD::FP_EXTEND, dl, MVT::f80, ValToCopy);
       RetOps.push_back(ValToCopy);
       // Don't emit a copytoreg.
@@ -1052,7 +1052,8 @@
   
   // Copy all of the result registers out of their specified physreg.
   for (unsigned i = 0; i != RVLocs.size(); ++i) {
-    MVT CopyVT = RVLocs[i].getValVT();
+    CCValAssign &VA = RVLocs[i];
+    MVT CopyVT = VA.getValVT();
   
     // If this is x86-64, and we disabled SSE, we can't return FP values
     if ((CopyVT == MVT::f32 || CopyVT == MVT::f64) && 
@@ -1064,9 +1065,9 @@
     // If this is a call to a function that returns an fp value on the floating
     // point stack, but where we prefer to use the value in xmm registers, copy
     // it out as F80 and use a truncate to move it from fp stack reg to xmm reg.
-    if ((RVLocs[i].getLocReg() == X86::ST0 ||
-         RVLocs[i].getLocReg() == X86::ST1) &&
-        isScalarFPTypeInSSEReg(RVLocs[i].getValVT())) {
+    if ((VA.getLocReg() == X86::ST0 ||
+         VA.getLocReg() == X86::ST1) &&
+        isScalarFPTypeInSSEReg(VA.getValVT())) {
       CopyVT = MVT::f80;
     }
 
@@ -1087,10 +1088,10 @@
     }
     InFlag = Chain.getValue(2);
 
-    if (CopyVT != RVLocs[i].getValVT()) {
+    if (CopyVT != VA.getValVT()) {
       // Round the F80 the right size, which also moves to the appropriate xmm
       // register.
-      Val = DAG.getNode(ISD::FP_ROUND, dl, RVLocs[i].getValVT(), Val,
+      Val = DAG.getNode(ISD::FP_ROUND, dl, VA.getValVT(), Val,
                         // This truncation won't change the value.
                         DAG.getIntPtrConstant(1));
     }





More information about the llvm-commits mailing list