https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114404
--- Comment #4 from Ilya Leoshkevich <iii at linux dot ibm.com> --- Thanks, cherry-picking https://gcc.gnu.org/git/gitweb.cgi?p=gcc.git;h=a98d5130a6dcff2ed4db371e500550134777b8cf helped both with the minimized testcase and the actual kernel bug. What you describe there - reassociation causing a wrong base term to be selected - matches what I've seen during debugging as well. So let's close this as a duplicate.