]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
final: go down ASHIFT in walk_alter_subreg
authorMichael Matz <matz@suse.de>
Thu, 22 Aug 2024 15:03:56 +0000 (17:03 +0200)
committerMichael Matz <matz@suse.de>
Tue, 27 Aug 2024 13:31:28 +0000 (15:31 +0200)
when experimenting with m68k plus LRA one of the
changes in the backend is to accept ASHIFTs (not only
MULT) as scale code for address indices.  When then not
turning on LRA but using reload those addresses are
presented to it which chokes on them.  While reload is
going away the change to make them work doesn't really hurt
(and generally seems useful, as MULT and ASHIFT really are
no different).  So just add it.

PR target/116413
* final.cc (walk_alter_subreg): Recurse on AHIFT.

gcc/final.cc

index eb9e065d9f0a35121ec22395e467c29049070657..5d911586de5bca928baeee3a68e7fe1bd37290e4 100644 (file)
@@ -3146,6 +3146,7 @@ walk_alter_subreg (rtx *xp, bool *changed)
     case PLUS:
     case MULT:
     case AND:
+    case ASHIFT:
       XEXP (x, 0) = walk_alter_subreg (&XEXP (x, 0), changed);
       XEXP (x, 1) = walk_alter_subreg (&XEXP (x, 1), changed);
       break;