Hi,
this patch adds VIEW_CONVERT_EXPR which is another code omitted in
operand_equal_p.  During bootstrap there are about 1000 matches.

Bootstrapped/regtested x86_64-linux, OK?

Honza

        * fold-const.c (operand_equal_p): Handle VIEW_CONVERT_EXPR.
Index: fold-const.c
===================================================================
--- fold-const.c        (revision 228735)
+++ fold-const.c        (working copy)
@@ -2962,6 +2968,12 @@ operand_equal_p (const_tree arg0, const_
        case IMAGPART_EXPR:
          return OP_SAME (0);
 
+       case VIEW_CONVERT_EXPR:
+         if (!(flags & (OEP_ADDRESS_OF | OEP_CONSTANT_ADDRESS_OF))
+             && !types_compatible_p (TREE_TYPE (arg0), TREE_TYPE (arg1)))
+           return false;
+         return OP_SAME (0);
+
        case TARGET_MEM_REF:
        case MEM_REF:
          if (!(flags & (OEP_ADDRESS_OF | OEP_CONSTANT_ADDRESS_OF)))

Reply via email to