r255696 - in /trunk/gcc: ChangeLog match.pd tes...
jakub@gcc.gnu.org
jakub@gcc.gnu.org
Fri Dec 15 14:36:00 GMT 2017
Author: jakub
Date: Fri Dec 15 14:36:26 2017
New Revision: 255696
URL: https://gcc.gnu.org/viewcvs?rev=255696&root=gcc&view=rev
Log:
PR sanitizer/81281
* match.pd ((T)(P + A) - (T)P -> (T) A): Use @@0 instead of @0 and
convert? on @0 instead of convert. Check type of @1, not @0.
((T)P - (T)(P + A) -> -(T) A): Use @@0 instead of @0 and
convert? on @0 instead of convert. Check type of @1, not @0.
((T)(P + A) - (T)(P + B) -> (T)A - (T)B): Use @@0 instead of @0,
only optimize if either both @1 and @2 types are narrower
precision, or both are wider or equal precision, and in the former
case only if both have undefined overflow.
* gcc.dg/pr81281-3.c: New test.
Added:
trunk/gcc/testsuite/gcc.dg/pr81281-3.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/match.pd
trunk/gcc/testsuite/ChangeLog
More information about the Gcc-cvs
mailing list