diff options
author | JoJo R <rjiejie@linux.alibaba.com> | 2021-12-14 16:55:57 -0500 |
---|---|---|
committer | Jeff Law <jeffreyalaw@gmail.com> | 2021-12-14 16:55:57 -0500 |
commit | a888259a71fbbb7f14923751251e056829d76342 (patch) | |
tree | 859c80814f3a7501939cbf2fcf3e46f3f9ad9ccf /gcc | |
parent | 7ce3c230edf6e498e125c805a6dd313bf87dc439 (diff) | |
download | gcc-a888259a71fbbb7f14923751251e056829d76342.zip gcc-a888259a71fbbb7f14923751251e056829d76342.tar.gz gcc-a888259a71fbbb7f14923751251e056829d76342.tar.bz2 |
regrename: Skip renaming if instruction is noop move.
gcc/
* regrename.c (find_rename_reg): Return satisfied regno
if instruction is noop move.
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/regrename.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/gcc/regrename.c b/gcc/regrename.c index b8a9ca3..fe72fcc 100644 --- a/gcc/regrename.c +++ b/gcc/regrename.c @@ -394,6 +394,11 @@ find_rename_reg (du_head_p this_head, enum reg_class super_class, this_head, *unavailable)) return this_head->tied_chain->regno; + /* If this insn is a noop move, then do not rename in this chain as doing so + would inhibit removal of the noop move. */ + if (noop_move_p (this_head->first->insn)) + return best_new_reg; + /* If PREFERRED_CLASS is not NO_REGS, we iterate in the first pass over registers that belong to PREFERRED_CLASS and try to find the best register within the class. If that failed, we iterate in |