This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Patch to extend the fix PR53676 to unsigned char


On Mon, Apr 22, 2013 at 5:21 PM, Laurent Alfonsi <laurent.alfonsi@st.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.

Thanks,
Richard.

> Regards,
> Laurent
>


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]