llvm.org GIT mirror llvm / d06791f
Use cast<> instead of dyn_cast<> in places where the type is known. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78881 91177308-0d34-0410-b5e6-96231b3b80d8 Bob Wilson 10 years ago
1 changed file(s) with 3 addition(s) and 5 deletion(s). Raw diff Collapse all Expand all
23622362
23632363 static SDValue BuildSplat(SDValue Val, EVT VT, SelectionDAG &DAG, DebugLoc dl) {
23642364 // Canonicalize all-zeros and all-ones vectors.
2365 ConstantSDNode *ConstVal = dyn_cast(Val.getNode());
2365 ConstantSDNode *ConstVal = cast(Val.getNode());
23662366 if (ConstVal->isNullValue())
23672367 return getZeroVector(VT, DAG, dl);
23682368 if (ConstVal->isAllOnesValue())
23992399 // If this is a case we can't handle, return null and let the default
24002400 // expansion code take care of it.
24012401 static SDValue LowerBUILD_VECTOR(SDValue Op, SelectionDAG &DAG) {
2402 BuildVectorSDNode *BVN = dyn_cast(Op.getNode());
2403 assert(BVN != 0 && "Expected a BuildVectorSDNode in LowerBUILD_VECTOR");
2402 BuildVectorSDNode *BVN = cast(Op.getNode());
24042403 DebugLoc dl = Op.getDebugLoc();
24052404 EVT VT = Op.getValueType();
24062405
24352434 }
24362435
24372436 static SDValue LowerVECTOR_SHUFFLE(SDValue Op, SelectionDAG &DAG) {
2438 ShuffleVectorSDNode *SVN = dyn_cast(Op.getNode());
2439 assert(SVN != 0 && "Expected a ShuffleVectorSDNode in LowerVECTOR_SHUFFLE");
2437 ShuffleVectorSDNode *SVN = cast(Op.getNode());
24402438 DebugLoc dl = Op.getDebugLoc();
24412439 EVT VT = Op.getValueType();
24422440