https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111010
--- Comment #9 from Uroš Bizjak <ubizjak at gmail dot com> --- (In reply to r...@cebitec.uni-bielefeld.de from comment #8) > > --- Comment #7 from Richard Biener <rguenth at gcc dot gnu.org> --- > > > > diff --git a/gcc/config/i386/i386.md b/gcc/config/i386/i386.md > > index f3a3305ac4f..d38b9d764d8 100644 > > --- a/gcc/config/i386/i386.md > > +++ b/gcc/config/i386/i386.md > > @@ -11511,7 +11511,7 @@ > > }) > > > > (define_insn_and_split "*concat<mode><dwi>3_3" > > - [(set (match_operand:<DWI> 0 "nonimmediate_operand" "=ro,r,r,&r") > > + [(set (match_operand:<DWI> 0 "nonimmediate_operand" "=ro,r,r,!&r") > > (any_or_plus:<DWI> > > (ashift:<DWI> > > (zero_extend:<DWI> > > > > fixes the issue for me, this disparages the &r,m,m alternative since > > that makes any reloading difficult(?) and the early-clobber output > > makes register pressure even harder to deal with. > > On the gcc-13 branch, it does indeed, both for the reduced testcase and > the original one. I've also successfully regtested the patch just in > case. I think you should add: (set_attr "isa" "*,*,*,x64") attribute to hard disable 32bit targets from having two memory operands.