On Wed, Apr 15, 2020 at 10:18:16AM +0100, Richard Sandiford wrote: > luoxhu--- via Gcc-patches <gcc-patches@gcc.gnu.org> writes: > > - count = simplify_gen_binary (PLUS, mode, count, const1_rtx); > > + { > > + /* Fold (add -1; zero_ext; add +1) operations to zero_ext based on > > addop0 > > + is never zero, as gimple pass loop ch will do optimization to simplify > > + the loop to NO loop for loop condition is false. */ > > IMO the code needs to prove this, rather than just assume that previous > passes have made it so.
Well, it should gcc_assert it, probably. It is the left-hand side of a+b... it cannot be 0, because niter always is simplified! Segher