From: Richard Biener Date: Fri, 19 Aug 2016 07:03:48 +0000 (+0000) Subject: match.pd (x | 0 -> x): Add. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=ca0b7ecec78f46508f044e33accba0a59bda0623;p=gcc.git match.pd (x | 0 -> x): Add. 2016-08-19 Richard Biener * match.pd (x | 0 -> x): Add. From-SVN: r239606 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 930663a39d1..0ec1ae4ecb9 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,7 @@ +2016-08-19 Richard Biener + + * match.pd (x | 0 -> x): Add. + 2016-08-19 Richard Biener PR tree-optimization/77286 diff --git a/gcc/match.pd b/gcc/match.pd index da87b027b62..123e754483e 100644 --- a/gcc/match.pd +++ b/gcc/match.pd @@ -541,13 +541,18 @@ DEFINE_INT_AND_FLOAT_ROUND_FN (RINT) /* x | ~0 -> ~0 */ (simplify - (bit_ior @0 integer_all_onesp@1) - @1) + (bit_ior @0 integer_all_onesp@1) + @1) + +/* x | 0 -> x */ +(simplify + (bit_ior @0 integer_zerop) + @0) /* x & 0 -> 0 */ (simplify - (bit_and @0 integer_zerop@1) - @1) + (bit_and @0 integer_zerop@1) + @1) /* ~x | x -> -1 */ /* ~x ^ x -> -1 */