[llvm] r210628 - Use cast instead of assert + dyn_cast

Matt Arsenault Matthew.Arsenault at amd.com
Tue Jun 10 20:30:06 PDT 2014


Author: arsenm
Date: Tue Jun 10 22:30:06 2014
New Revision: 210628

URL: http://llvm.org/viewvc/llvm-project?rev=210628&view=rev
Log:
Use cast instead of assert + dyn_cast

Modified:
    llvm/trunk/lib/Target/R600/AMDGPUISelLowering.cpp

Modified: llvm/trunk/lib/Target/R600/AMDGPUISelLowering.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/R600/AMDGPUISelLowering.cpp?rev=210628&r1=210627&r2=210628&view=diff
==============================================================================
--- llvm/trunk/lib/Target/R600/AMDGPUISelLowering.cpp (original)
+++ llvm/trunk/lib/Target/R600/AMDGPUISelLowering.cpp Tue Jun 10 22:30:06 2014
@@ -726,8 +726,7 @@ SDValue AMDGPUTargetLowering::LowerFrame
   const AMDGPUFrameLowering *TFL =
    static_cast<const AMDGPUFrameLowering*>(getTargetMachine().getFrameLowering());
 
-  FrameIndexSDNode *FIN = dyn_cast<FrameIndexSDNode>(Op);
-  assert(FIN);
+  FrameIndexSDNode *FIN = cast<FrameIndexSDNode>(Op);
 
   unsigned FrameIndex = FIN->getIndex();
   unsigned Offset = TFL->getFrameIndexOffset(MF, FrameIndex);
@@ -921,7 +920,7 @@ SDValue AMDGPUTargetLowering::SplitVecto
 
 SDValue AMDGPUTargetLowering::MergeVectorStore(const SDValue &Op,
                                                SelectionDAG &DAG) const {
-  StoreSDNode *Store = dyn_cast<StoreSDNode>(Op);
+  StoreSDNode *Store = cast<StoreSDNode>(Op);
   EVT MemVT = Store->getMemoryVT();
   unsigned MemBits = MemVT.getSizeInBits();
 





More information about the llvm-commits mailing list