[PATCH] D147429: [GuardWidening] Fix the crash while replacing the users of poison.

Max Kazantsev via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Apr 3 03:00:05 PDT 2023


mkazantsev accepted this revision.
mkazantsev added a comment.
This revision is now accepted and ready to land.

Test coverage is weak. Could you please commit more tests where we freeze:

- a global used in more than one function (to make sure we don't replace with freeze in neighboring functions)
- an argument

?

Not blocking on this.



================
Comment at: llvm/lib/Transforms/Scalar/GuardWidening.cpp:639
+      V->replaceUsesWithIf(FI,
+                           [&](Use & U)->bool { return U.getUser() != FI; });
+    else
----------------
`[&](const Use &U) { return U.getUser() != FI; });`?


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

https://reviews.llvm.org/D147429



More information about the llvm-commits mailing list