Yours (Richard Kenner's) patch to genrecog

Jan Hubicka jh@suse.cz
Sat Oct 20 03:13:00 GMT 2001


Richard,
while ago we've discussed that the following patch:
Fri May 18 07:26:34 2001  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>

        * genrecog.c (enum decision_type): Add DT_elt_zero-wide_safe.
        (add_to_sequence): Make that decision type.
        (maybe_both_true_2, nodes_identical_1, factor_tests): Use it.
        (write_switch, write_cond, debug_decision_2): Likewise.

is wrong, as it makes genrecog to generate switch over values wider than
host's int (this is common in case HOST_WIDE_INT is long long as done for
64bit crosscompilers) that makes values to be truncated and for instance
(const_int 0x100000000) is recognized as (const_int 0).

This bug remains in the tree and I got bit by it again while regtesting the
x86_64 port.  Do you think it is sane to revert the patch?  Or you have
idea about better solution?

Honza



More information about the Gcc-bugs mailing list