On 10/4/26 5:39 AM, Aldy Hernandez wrote:
optimize_stmt turns if (b == 5) into if (0 == 5) when b has a [0, 1]
range.  We're already calling simplify_stmt which takes care of this.
Remove the code.

I've run this patch through my .ii harness and there's one file with
different assembly, and it's because we fold one more conditional :).

OK pending further tests?

gcc/ChangeLog:

        * tree-ssa-dom.cc (dom_opt_dom_walker::optimize_stmt): Remove the
        boolean range special case.

gcc/testsuite/ChangeLog:

        * gcc.dg/tree-ssa/ssa-dom-simplify-4.c: New test.
OK
jeff

Reply via email to