[PATCH] D139275: [SimplifyCFG] `FoldBranchToCommonDest()`: deal with mismatched IV's in PHI's in common successor block

Matt Arsenault via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Dec 5 08:59:42 PST 2022


arsenm added a comment.

Thanks



================
Comment at: llvm/lib/Transforms/Utils/SimplifyCFG.cpp:3674
+    if (!SI)
+      SI = cast<SelectInst>(Builder.CreateSelect(PBI->getCondition(), BBIV,
+                                                 PBBIV, PN.getName() + ".sel"));
----------------
How can you be sure this won't constant fold to a ConstantExpr?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D139275



More information about the llvm-commits mailing list