https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63184
Jeffrey A. Law <law at redhat dot com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |law at redhat dot com --- Comment #8 from Jeffrey A. Law <law at redhat dot com> --- So while we don't optimize this on the tree level, the addressing lowering that was introduced for gcc-6 sets things up so the RTL optimizers can detect the equivalences and remove the tests. So ISTM we can do two things here. Keep this as a regression since it'd be nice for the SSA/gimple optimizers to catch this. Or mark it was fixed for gcc-6 and gcc-7 since the RTL optimizers are able to clean this stuff up.