[llvm] 6595ef0 - GVN.cpp: Suppress a warning in D141712 [-Wunused-variable]

NAKAMURA Takumi via llvm-commits llvm-commits at lists.llvm.org
Wed Jan 25 16:54:45 PST 2023


Author: NAKAMURA Takumi
Date: 2023-01-26T09:53:59+09:00
New Revision: 6595ef0900121eca85942917ac8b66a7c1f66fac

URL: https://github.com/llvm/llvm-project/commit/6595ef0900121eca85942917ac8b66a7c1f66fac
DIFF: https://github.com/llvm/llvm-project/commit/6595ef0900121eca85942917ac8b66a7c1f66fac.diff

LOG: GVN.cpp: Suppress a warning in D141712 [-Wunused-variable]

Added: 
    

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

Removed: 
    


################################################################################
diff  --git a/llvm/lib/Transforms/Scalar/GVN.cpp b/llvm/lib/Transforms/Scalar/GVN.cpp
index c01e9e5d0af6a..e90db02427dfe 100644
--- a/llvm/lib/Transforms/Scalar/GVN.cpp
+++ b/llvm/lib/Transforms/Scalar/GVN.cpp
@@ -1611,6 +1611,7 @@ bool GVNPass::PerformLoadPRE(LoadInst *Load, AvailValInBlkVect &ValuesPerBlock,
       CriticalEdgePredAndLoad.size();
   assert(NumUnavailablePreds != 0 &&
          "Fully available value should already be eliminated!");
+  (void)NumUnavailablePreds;
 
   // If we need to insert new load in multiple predecessors, reject it.
   // FIXME: If we could restructure the CFG, we could make a common pred with


        


More information about the llvm-commits mailing list