On Sat, 24 Oct 2015, Jan Hubicka wrote: > Hi, as discussed earlier, the types_compatible_p in operand_equal_p > seems redundant. (it is callers work to figure out how much of type > matching it wants. If not, we probably want to treat most of other > references and casts simlar way). > > Bootstrapped/regtested x86_64-linux. OK?
Ok. Btw, you need to audit tree hashing for required changes with respect to your ones to operand_equal_p. operand_equal_p is the equality function for it. Thanks, Richard. > * fold-const.c (operand_equal_p): Drop types_compatible_p when > comparing references. > > Index: fold-const.c > =================================================================== > --- fold-const.c (revision 229278) > +++ fold-const.c (working copy) > @@ -2982,9 +2982,6 @@ operand_equal_p (const_tree arg0, const_ > TYPE_SIZE (TREE_TYPE (arg1)), > flags))) > return 0; > - /* Verify that access happens in similar types. */ > - if (!types_compatible_p (TREE_TYPE (arg0), TREE_TYPE (arg1))) > - return 0; > /* Verify that accesses are TBAA compatible. */ > if (flag_strict_aliasing > && (!alias_ptr_types_compatible_p > > -- Richard Biener <rguent...@suse.de> SUSE LINUX GmbH, GF: Felix Imendoerffer, Jane Smithard, Graham Norton, HRB 21284 (AG Nuernberg)