[PATCH v4] PR target/30315 i386 missed optimization detecting overflows
Uros Bizjak
ubizjak@gmail.com
Tue Aug 14 12:25:00 GMT 2007
Rask Ingemann Lambertsen wrote:
> Here is a revised patch. I made the above changes and also used combine's
> hook for canonicalizing comparison so we don't need two versions of each
> pattern. Additionally, I made the sub*cconly_overflow pattern clobberless.
> The testcase was adjusted accordingly. Bootstrapped and tested on
> x86_64-unknown-linux-gnu (all default languages, --enable-checking=yes,rtl)
> with no regressions. Ok for trunk?
>
> 2007-08-12 Rask Ingemann Lambertsen <rask@sygehus.dk>
>
> PR target/30315
> * config/i386/i386.h (CANONICALIZE_COMPARISON): New.
> * config/i386/i386.md (plusminus)(addsub)(SWI): New.
> (*<addsub><mode>3_cc_overflow): New.
> (*add<mode>3_cconly_overflow): New.
> (*sub<mode>3_cconly_overflow): New.
> (*<addsub>si3_zext_cc_overflow): New.
> * config/i386/predicates.md (fcmov_comparison_operator): Accept
> CCCmode for LTU, GTU, LEU and GEU.
> (ix86_comparison_operator): Likewise.
> (ix86_carry_flag_operator): Carry flag is set if LTU or GTU in CCCmode.
> * gcc/config/i386/i386.c (put_condition_code): Support CCCmode.
> (ix86_cc_mode): Use CCCmode when testing for overflow of PLUS
> or MINUS expressions.
>
> testsuite/
>
> 2007-08-12 Rask Ingemann Lambertsen <rask@sygehus.dk>
>
> PR target/30315
> * gcc.target/i386/pr30315.c: New.
>
This is OK for mainline.
Thanks,
Uros.
More information about the Gcc-patches
mailing list