[llvm-commits] [llvm] r59018 - /llvm/trunk/lib/Target/CellSPU/SPUISelLowering.cpp

Scott Michel scottm at aero.org
Mon Nov 10 19:06:10 PST 2008


Author: pingbak
Date: Mon Nov 10 21:06:06 2008
New Revision: 59018

URL: http://llvm.org/viewvc/llvm-project?rev=59018&view=rev
Log:
Unbreak the buildbot and back out (inadvertant) casting edits in CellSPU
backend.

Modified:
    llvm/trunk/lib/Target/CellSPU/SPUISelLowering.cpp

Modified: llvm/trunk/lib/Target/CellSPU/SPUISelLowering.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/CellSPU/SPUISelLowering.cpp?rev=59018&r1=59017&r2=59018&view=diff

==============================================================================
--- llvm/trunk/lib/Target/CellSPU/SPUISelLowering.cpp (original)
+++ llvm/trunk/lib/Target/CellSPU/SPUISelLowering.cpp Mon Nov 10 21:06:06 2008
@@ -1033,7 +1033,7 @@
 /// isLSAAddress - Return the immediate to use if the specified
 /// value is representable as a LSA address.
 static SDNode *isLSAAddress(SDValue Op, SelectionDAG &DAG) {
-  ConstantSDNode *C = cast<ConstantSDNode>(Op);
+  ConstantSDNode *C = dyn_cast<ConstantSDNode>(Op);
   if (!C) return 0;
 
   int Addr = C->getZExtValue();
@@ -1147,7 +1147,7 @@
   // If the callee is a GlobalAddress/ExternalSymbol node (quite common, every
   // direct call is) turn it into a TargetGlobalAddress/TargetExternalSymbol
   // node so that legalize doesn't hack it.
-  if (GlobalAddressSDNode *G = cast<GlobalAddressSDNode>(Callee)) {
+  if (GlobalAddressSDNode *G = dyn_cast<GlobalAddressSDNode>(Callee)) {
     GlobalValue *GV = G->getGlobal();
     MVT CalleeVT = Callee.getValueType();
     SDValue Zero = DAG.getConstant(0, PtrVT);
@@ -1172,7 +1172,7 @@
       // address pairs:
       Callee = DAG.getNode(SPUISD::IndirectAddr, PtrVT, GA, Zero);
     }
-  } else if (ExternalSymbolSDNode *S = cast<ExternalSymbolSDNode>(Callee))
+  } else if (ExternalSymbolSDNode *S = dyn_cast<ExternalSymbolSDNode>(Callee))
     Callee = DAG.getExternalSymbol(S->getSymbol(), Callee.getValueType());
   else if (SDNode *Dest = isLSAAddress(Callee, DAG)) {
     // If this is an absolute destination address that appears to be a legal
@@ -1307,7 +1307,7 @@
   }
 
   if (OpVal.getNode() != 0) {
-    if (ConstantSDNode *CN = cast<ConstantSDNode>(OpVal)) {
+    if (ConstantSDNode *CN = dyn_cast<ConstantSDNode>(OpVal)) {
       return CN;
     }
   }
@@ -1461,9 +1461,9 @@
       uint64_t EltUndefBits = ~0ULL >> (64-EltBitSize);
       UndefBits[PartNo] |= EltUndefBits << (SlotNo*EltBitSize);
       continue;
-    } else if (ConstantSDNode *CN = cast<ConstantSDNode>(OpVal)) {
+    } else if (ConstantSDNode *CN = dyn_cast<ConstantSDNode>(OpVal)) {
       EltBits = CN->getZExtValue() & (~0ULL >> (64-EltBitSize));
-    } else if (ConstantFPSDNode *CN = cast<ConstantFPSDNode>(OpVal)) {
+    } else if (ConstantFPSDNode *CN = dyn_cast<ConstantFPSDNode>(OpVal)) {
       const APFloat &apf = CN->getValueAPF();
       EltBits = (CN->getValueType(0) == MVT::f32
                  ? FloatToBits(apf.convertToFloat())
@@ -2039,7 +2039,7 @@
   SDValue N = Op.getOperand(0);
   SDValue Elt = Op.getOperand(1);
   SDValue ShufMask[16];
-  ConstantSDNode *C = cast<ConstantSDNode>(Elt);
+  ConstantSDNode *C = dyn_cast<ConstantSDNode>(Elt);
 
   assert(C != 0 && "LowerEXTRACT_VECTOR_ELT expecting constant SDNode");
 





More information about the llvm-commits mailing list