diff options
author | Kewen Lin <linkw@linux.ibm.com> | 2020-02-11 23:22:02 -0600 |
---|---|---|
committer | Kewen Lin <linkw@linux.ibm.com> | 2020-02-11 23:22:02 -0600 |
commit | 4d2248bec5d22061ab252724bd59d45c8a47e009 (patch) | |
tree | 4018459a0ec50842a8e3744b0b36003202d62712 /gcc/ira.c | |
parent | 91f993b7e31ce85676148dca180bc0d827d4245e (diff) | |
download | gcc-4d2248bec5d22061ab252724bd59d45c8a47e009.zip gcc-4d2248bec5d22061ab252724bd59d45c8a47e009.tar.gz gcc-4d2248bec5d22061ab252724bd59d45c8a47e009.tar.bz2 |
[IRA] Fix PR91052 by skipping multiple_sets insn in combine_and_move_insns
As PR91052's comments show, commit r272731 exposed one issue in function
combine_and_move_insns. Function combine_and_move_insns perform the
unexpected movement which alter live interval of some register, leading
incorrect value to be used. See PR91052 for details.
2020-02-12 Kewen Lin <linkw@gcc.gnu.org>
PR target/91052
* ira.c (combine_and_move_insns): Skip multiple_sets def_insn.
Diffstat (limited to 'gcc/ira.c')
-rw-r--r-- | gcc/ira.c | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -3784,6 +3784,11 @@ combine_and_move_insns (void) if (can_throw_internal (def_insn)) continue; + /* Instructions with multiple sets can only be moved if DF analysis is + performed for all of the registers set. See PR91052. */ + if (multiple_sets (def_insn)) + continue; + basic_block use_bb = BLOCK_FOR_INSN (use_insn); basic_block def_bb = BLOCK_FOR_INSN (def_insn); if (bb_loop_depth (use_bb) > bb_loop_depth (def_bb)) |