[PATCH] D127146: [LoopFlatten] Replace unchecked dyn_cast with cast.
    Craig Topper via Phabricator via llvm-commits 
    llvm-commits at lists.llvm.org
       
    Tue Jun  7 08:25:32 PDT 2022
    
    
  
This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rGfdd5843572c0: [LoopFlatten] Replace unchecked dyn_cast with cast. (authored by craig.topper).
Repository:
  rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D127146/new/
https://reviews.llvm.org/D127146
Files:
  llvm/lib/Transforms/Scalar/LoopFlatten.cpp
Index: llvm/lib/Transforms/Scalar/LoopFlatten.cpp
===================================================================
--- llvm/lib/Transforms/Scalar/LoopFlatten.cpp
+++ llvm/lib/Transforms/Scalar/LoopFlatten.cpp
@@ -411,7 +411,7 @@
   // pre-header and one from the latch. The incoming latch value is the
   // increment variable.
   Increment =
-      dyn_cast<BinaryOperator>(InductionPHI->getIncomingValueForBlock(Latch));
+      cast<BinaryOperator>(InductionPHI->getIncomingValueForBlock(Latch));
   if (Increment->hasNUsesOrMore(3)) {
     LLVM_DEBUG(dbgs() << "Could not find valid increment\n");
     return false;
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D127146.434826.patch
Type: text/x-patch
Size: 623 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220607/b70d4bf8/attachment.bin>
    
    
More information about the llvm-commits
mailing list