[PATCH] D48111: [JumpThreading] Don't try to rewrite a use if it's already valid.

Brian Rzycki via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jun 21 08:16:50 PDT 2018


brzycki added a comment.

This problem seems to be aggravated by the new `SSAUpdaterBulk()` patch pushed on May 12 ( https://reviews.llvm.org/D44282 ) since the `PR37745.ll` test case does not fail before that date. I don't understand the SSA updater change enough to understand why this problem only happens with the new bulk updates, @mzolotukhin do you happen to know why?

This is a minimal fix, much smaller than the big SSA changes so other than my request for a comment change it LGTM.



================
Comment at: llvm/lib/Transforms/Scalar/JumpThreading.cpp:2032
     // from PredBB - we'll remove them anyway.
     for (Use &U : I.uses()) {
       Instruction *User = cast<Instruction>(U.getUser());
----------------
Please add a comment stating why the domination check should be skipped: it's non-trivial as it's a different check than the User is BB in the old code.


Repository:
  rL LLVM

https://reviews.llvm.org/D48111





More information about the llvm-commits mailing list