This is the mail archive of the
mailing list for the GCC project.
Re: Patch to extend the fix PR53676 to unsigned char
- From: Richard Biener <richard dot guenther at gmail dot com>
- To: Laurent Alfonsi <laurent dot alfonsi at st dot com>
- Cc: "gcc-patches at gcc dot gnu dot org" <gcc-patches at gcc dot gnu dot org>
- Date: Mon, 22 Apr 2013 17:32:27 +0200
- Subject: Re: Patch to extend the fix PR53676 to unsigned char
- References: <5175557B dot 7050201 at st dot com>
On Mon, Apr 22, 2013 at 5:21 PM, Laurent Alfonsi <email@example.com> wrote:
> The patch well fix the adobe_cpp performance regression on the int8_t type.
> But the same degradation exists on uint8_t type, which is not fixed by the
> patch referenced in PR53676.
> With the signed version, the code:
> result_5 = (signed char) ((int) result_2 + 2)
> is now well narrowed to:
> result_5 = (signed char) ((unsigned char) result_2 + 2)
> But with the unsigned version:
> result_5 = (unsigned char) ((int) result_2 + 2)
> is not narrowed to:
> result_5 = (unsigned char) ((unsigned char) result_2 + 2)
> As a consequence, result_5 is not detected as polynomial, and the loop is
> not removed.
> Tested on SH target. bootstrap + regression tests on
> x86_64-unknown-linux-gnu in progress.
Ok if testing succeeds, but please also adjust the comment before
the 2nd hunk and add a testcase that fails before and succeeds after.