https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67391
--- Comment #18 from Oleg Endo <olegendo at gcc dot gnu.org> --- (In reply to Kazumoto Kojima from comment #17) > (In reply to Oleg Endo from comment #16) > > Kaz, does this patch fix the issue in c#11 ? > > Yep, it fixes that ICE. Thanks! > My 36387 trial patch can cause a similar problem with PR64533 when sp > is taken as the scratch register. I've modified your patch with > > diff --git a/config/sh/sh.md b/config/sh/sh.md > index 3e6a244..8e08d0b 100644 > --- a/config/sh/sh.md > +++ b/config/sh/sh.md > @@ -2197,7 +2197,7 @@ > [(set (match_operand:SI 0 "arith_reg_dest" "=r,&u,&u") > (plus:SI (match_operand:SI 1 "arith_reg_operand" "%0,r,r") > (match_operand:SI 2 "arith_or_int_operand" "rI08,r,n"))) > - (clobber (match_scratch:SI 3 "=X,X,&r"))] > + (clobber (match_scratch:SI 3 "=X,X,&u"))] > "TARGET_SH1" > "@ > add %2,%0 > > Now the full tests on sh4-unknown-linux-gnu are running. I'll report > the results when completed. OK. I've checked CSiBE results with &u instead of &r for the scratch. There's a small size increase ... &r sum: 3345527 -> 3334307 -11220 / -0.335373 % &u sum: 3345527 -> 3334351 -11176 / -0.334058 % But doesn't matter. It's still better than without the patch ;)