[PATCH] D85029: [JumpThreading] Allow duplicating a basic block into preds when its branch condition is freeze(phi)

Juneyoung Lee via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Aug 5 00:32:10 PDT 2020


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


================
Comment at: llvm/lib/Transforms/Scalar/JumpThreading.cpp:1778
+  // This transformation is correct when a frozen PN is used as a branch
+  // condition as well, because it does not remove the freeze instruction.
+  //
----------------
efriedma wrote:
> This comment is a bit misleading.  Really, this transform is valid on any PHI node, whether or not it feeds into the branch.  It's just a heuristic that we only do this for i1 PHIs that feed directly into a branch.
Rephrased the comment a bit


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D85029



More information about the llvm-commits mailing list