[PATCH] D136297: llvm-reduce: Skip reducing branches that already have the condition to set

Matt Arsenault via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Oct 20 11:41:28 PDT 2022


arsenm added inline comments.


================
Comment at: llvm/tools/llvm-reduce/deltas/ReduceUsingSimplifyCFG.cpp:45
+
+      // Skip cases that already have the value we're going to set this to.
+      ConstantInt *Cond = dyn_cast<ConstantInt>(BR->getCondition());
----------------
arsenm wrote:
> aeubanks wrote:
> > we should prefer either zero or one over the other. if we prefer zero, don't try to to change a zero to a one. we do this in the ReduceOperands pass
> The point here isn't to reduce the condition to zero or one. The point is to see what unconditionally branching to one side or the other can do. 
Maybe this should proceed and try simplifyCFG anyway, even though that's redundant with the simplify-cfg reduction (which runs later)


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

https://reviews.llvm.org/D136297



More information about the llvm-commits mailing list