> > And no, I'm hesitant to change operand_equal_p too much. It's > very much deep-rooted into GENERIC.
OK, as another option, i can bring relevant logic from operand_equal_p to ipa-icf and separate it into the compare_operand class like I did. Use it in ipa-icf-gimple now and we can slowly turn other uses of operand_equal into the compare_operand users in middle end. I agree that operand_equal is bit crazy code and it does not handle quite few things we could do at gimple. I have nothing against going this direction. (after all I do not like touching fold-const much becuase it works on generic, gimple and FE non-generic and it is not well specified what it should do) Honza