[PATCH] D104063: [SimplifyCFG] avoid crash on degenerate loop

Sanjay Patel via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jun 11 05:56:09 PDT 2021


spatel marked an inline comment as done.
spatel added inline comments.


================
Comment at: llvm/lib/Transforms/Utils/SimplifyCFG.cpp:2718
+  // can't be the candidate if-condition for a select that we want to form.
+  if (auto *IfCondInst = dyn_cast<Instruction>(IfCond))
+    if (IfCondInst->getParent() == BB)
----------------
lebedev.ri wrote:
> I think we only need to care about PHI nodes
Sounds good - I'll change that on final commit.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D104063/new/

https://reviews.llvm.org/D104063



More information about the llvm-commits mailing list