[llvm] r193869 - Use isa<> instead of dyn_cast<> with unused value

Matt Arsenault Matthew.Arsenault at amd.com
Fri Nov 1 10:39:27 PDT 2013


Author: arsenm
Date: Fri Nov  1 12:39:26 2013
New Revision: 193869

URL: http://llvm.org/viewvc/llvm-project?rev=193869&view=rev
Log:
Use isa<> instead of dyn_cast<> with unused value

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

Modified: llvm/trunk/lib/Target/R600/R600ISelLowering.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/R600/R600ISelLowering.cpp?rev=193869&r1=193868&r2=193869&view=diff
==============================================================================
--- llvm/trunk/lib/Target/R600/R600ISelLowering.cpp (original)
+++ llvm/trunk/lib/Target/R600/R600ISelLowering.cpp Fri Nov  1 12:39:26 2013
@@ -1211,9 +1211,9 @@ SDValue R600TargetLowering::LowerLOAD(SD
   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 :





More information about the llvm-commits mailing list