https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82397
Alexander Monakov <amonakov at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |amonakov at gcc dot gnu.org --- Comment #1 from Alexander Monakov <amonakov at gcc dot gnu.org> --- This is because operand_equal_p is "smarter" than data_ref_compare_tree. We have something like A: (long)_1 + (_2 + _3) B: (_2 + _4) + (long)_1 C: (_2 + _3) + (long)_1 with A == C != B according to operand_equal_p (and A < B < C according to data_ref_compare_tree), making comparison steps like this non-transitive: if (!operand_equal_p (DR_BASE_ADDRESS (dra), DR_BASE_ADDRESS (drb), 0)) { cmp = data_ref_compare_tree (DR_BASE_ADDRESS (dra), DR_BASE_ADDRESS (drb)); Perhaps additive chains in compared operands should be canonicalized first so that if two items are equal according to operand_equal_p they're also guaranteed to be equal according to data_ref_compare_tree?