We are looking at improving analysis for undef in D97244, but there is concern that extra assumptions created can counteract the benefits.
While looking at the most basic examples, it seems clear that simplifycfg is creating assumes that have no possible benefit because no uses of the incoming values remain after we reduce the control-flow. The usual dead code elimination utils don't try hard to kill assumes, so this can lead to bloat that remains through the optimizer.
This patch tries to avoid creating assumes during branch elimination if there is likely no need for them. This reverses several of the test diffs that were added with D61409, but I added some test comments to show that we do still create assumes where it would be helpful.