https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93080

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |ASSIGNED
   Last reconfirmed|                            |2019-12-27
   Target Milestone|---                         |11.0
     Ever confirmed|0                           |1

--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Mine for GCC 11.

Patch:
diff --git a/gcc/match.pd b/gcc/match.pd
index 84a62ef..c81c5ea 100644
--- a/gcc/match.pd
+++ b/gcc/match.pd
@@ -5682,6 +5682,11 @@ DEFINE_INT_AND_FLOAT_ROUND_FN (RINT)
       && TYPE_PRECISION (type) == TYPE_PRECISION (TREE_TYPE (@1)))
   (convert @1)))

+/* Inserting in the same value as extracted is just the original value. */
+(simplify
+ (bit_insert @0 (BIT_FIELD_REF @0 @1 @2) @2)
+ @0)
+
 /* bit_insert<@0 convert:@1<@2> @3> -> bit_insert<@0 @2 @3> iff @1 was in
    the correct precision already and is an insert for integral type. */
 (simplify

Reply via email to