R600: Replace dyn_cast + assert with cast
authorTom Stellard <thomas.stellard@amd.com>
Mon, 7 Apr 2014 19:31:13 +0000 (19:31 +0000)
committerTom Stellard <thomas.stellard@amd.com>
Mon, 7 Apr 2014 19:31:13 +0000 (19:31 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@205730 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/R600/AMDGPUISelDAGToDAG.cpp

index 1661056f2974c3df3d92ec0b8f02a3546941fa0e..9a15d4d34faac7c23cbf90ec69729558eab7fc39 100644 (file)
@@ -376,8 +376,7 @@ SDNode *AMDGPUDAGToDAGISel::Select(SDNode *N) {
     if (ConstantFPSDNode *FP = dyn_cast<ConstantFPSDNode>(N))
       Imm = FP->getValueAPF().bitcastToAPInt().getZExtValue();
     else {
-      ConstantSDNode *C = dyn_cast<ConstantSDNode>(N);
-      assert(C);
+      ConstantSDNode *C = cast<ConstantSDNode>(N);
       Imm = C->getZExtValue();
     }