https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70164
--- Comment #14 from Jeffrey A. Law <law at redhat dot com> --- Some further notes. I was looking at what the impact would be if we just stopped recording the problematical equivalences in CSE, both to see if the equivalences are useful at all, and if they are, to get a sense of when (which might perhaps lead to some useful conditions for recording them). I was quite surprised at how much of a difference in the resulting code generation these equivalences make. One of the things that is emerging is that these equivalences are useful when the copy propagation they enable allows one operand to die at the comparison when it didn't die before. That in turn may allow creation of REG_EQUIV note on the insn that initializes the dying register. Which then allows substitution of the equivalent memory for the register in the comparison. We still have the same number of memory references, but we use one less register in that case and have one less instruction. We obviously don't have that level of insight during CSE. But given uses/sets DF info, we can get a lot of the way there. Anyway, just wanted to record some of my findings. I'm putting this down for now as it's not likely to be a gcc-6 kind of change.