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: [RFC] optimize x - y cmp 0 with undefined overflow


On May 27, 2014 6:12:58 PM CEST, Eric Botcazou <ebotcazou@adacore.com> wrote:
>> I'm asking to merge them (move them to fold_comparison).
>
>Done (in the end the patch removes more lines than it adds :-).

That's what I like!

>Tested on x86_64-suse-linux with no regressions.

OK.
Thanks,
Richard.


>
>2014-05-27  Eric Botcazou  <ebotcazou@adacore.com>
>
>	* fold-const.c (fold_comparison): Clean up and extend X +- C1 CMP C2
>	to X CMP C2 -+ C1 transformation to EQ_EXPR/NE_EXPR.
>	Add X - Y CMP 0 to X CMP Y transformation.
>	(fold_binary_loc) <EQ_EXPR/NE_EXPR>: Remove same transformations.
>
>
>2014-05-27  Eric Botcazou  <ebotcazou@adacore.com>
>
>        * gcc.dg/fold-compare-8.c: New test.
>        * gcc.dg/Wstrict-overflow-25.c: Likewise.



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