[llvm] r316977 - [NFC] Get rid of variables used in assert only

Max Kazantsev via llvm-commits llvm-commits at lists.llvm.org
Mon Oct 30 22:33:58 PDT 2017


Author: mkazantsev
Date: Mon Oct 30 22:33:58 2017
New Revision: 316977

URL: http://llvm.org/viewvc/llvm-project?rev=316977&view=rev
Log:
[NFC] Get rid of variables used in assert only

Modified:
    llvm/trunk/lib/Transforms/Scalar/GVN.cpp

Modified: llvm/trunk/lib/Transforms/Scalar/GVN.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/GVN.cpp?rev=316977&r1=316976&r2=316977&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Scalar/GVN.cpp (original)
+++ llvm/trunk/lib/Transforms/Scalar/GVN.cpp Mon Oct 30 22:33:58 2017
@@ -2421,14 +2421,14 @@ GVN::fillImplicitControlFlowInfo(BasicBl
     // must be removed once isGuaranteedToTransferExecutionToSuccessor is fixed.
     if (isGuaranteedToTransferExecutionToSuccessor(I))
       return false;
-    if (auto *LI = dyn_cast<LoadInst>(I)) {
-      assert(LI->isVolatile() && "Non-volatile load should transfer execution"
-                                 " to successor!");
+    if (isa<LoadInst>(I)) {
+      assert(cast<LoadInst>(I)->isVolatile() &&
+             "Non-volatile load should transfer execution to successor!");
       return false;
     }
-    if (auto *SI = dyn_cast<StoreInst>(I)) {
-      assert(SI->isVolatile() && "Non-volatile store should transfer execution"
-                                 " to successor!");
+    if (isa<StoreInst>(I)) {
+      assert(cast<StoreInst>(I)->isVolatile() &&
+             "Non-volatile store should transfer execution to successor!");
       return false;
     }
     return true;




More information about the llvm-commits mailing list