Use isa<> instead of dyn_cast<> with unused value
authorMatt Arsenault <Matthew.Arsenault@amd.com>
Fri, 1 Nov 2013 17:39:26 +0000 (17:39 +0000)
committerMatt Arsenault <Matthew.Arsenault@amd.com>
Fri, 1 Nov 2013 17:39:26 +0000 (17:39 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193869 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/R600/R600ISelLowering.cpp

index 090ab85c6759613e2382529e23d8af8162c0d983..a7522b2771b1deed7f602bc2ed344f84a9eaf379 100644 (file)
@@ -1211,9 +1211,9 @@ SDValue R600TargetLowering::LowerLOAD(SDValue Op, SelectionDAG &DAG) const
   int ConstantBlock = ConstantAddressBlock(LoadNode->getAddressSpace());
   if (ConstantBlock > -1 && LoadNode->getExtensionType() != ISD::SEXTLOAD) {
     SDValue Result;
-    if (dyn_cast<ConstantExpr>(LoadNode->getSrcValue()) ||
-        dyn_cast<Constant>(LoadNode->getSrcValue()) ||
-        dyn_cast<ConstantSDNode>(Ptr)) {
+    if (isa<ConstantExpr>(LoadNode->getSrcValue()) ||
+        isa<Constant>(LoadNode->getSrcValue()) ||
+        isa<ConstantSDNode>(Ptr)) {
       SDValue Slots[4];
       for (unsigned i = 0; i < 4; i++) {
         // We want Const position encoded with the following formula :