https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112758
--- Comment #15 from Greg McGary <gkm at rivosinc dot com> --- I have a simple patch for this which I will submit soon. The idea is to do nothing in expand_compound_operation() when the pattern is (sign_extend (mem ...) ).