[llvm] [InstCombine] Re-queue users of phi when nsw/nuw flags of add are inferred (PR #113933)
via llvm-commits
llvm-commits at lists.llvm.org
Tue Oct 29 07:57:10 PDT 2024
================
@@ -1868,6 +1868,13 @@ Instruction *InstCombinerImpl::visitAdd(BinaryOperator &I) {
if (Instruction *Res = foldBinOpOfSelectAndCastOfSelectCondition(I))
return Res;
+ if (Changed) {
+ for (User *U : I.users()) {
+ if (auto *PHI = dyn_cast<PHINode>(U))
+ Worklist.pushUsersToWorkList(*PHI);
+ }
+ }
----------------
goldsteinn wrote:
Oh yeah duh
https://github.com/llvm/llvm-project/pull/113933
More information about the llvm-commits
mailing list