Skip to content
Snippets Groups Projects
Commit 41c7cac5 authored by Richard Sandiford's avatar Richard Sandiford Committed by Richard Sandiford
Browse files

Use df_read_modify_subreg_p in cprop.c


local_cprop_find_used_regs punted on all multiword registers,
with the comment:

          /* Setting a subreg of a register larger than word_mode leaves
             the non-written words unchanged.  */

But this only applies if the outer mode is smaller than the
inner mode.  If they're the same size then writes to the subreg
are a normal full update.

This patch uses df_read_modify_subreg_p instead.  A later patch
adds more uses of the same routine, but this part had a (positive)
effect on code generation for the testsuite whereas the others
seemed to be simple clean-ups.

gcc/
2016-11-15  Richard Sandiford  <richard.sandiford@arm.com>
	    Alan Hayward  <alan.hayward@arm.com>
	    David Sherwood  <david.sherwood@arm.com>

	* cprop.c (local_cprop_find_used_regs): Use df_read_modify_subreg_p.

Co-Authored-By: default avatarAlan Hayward <alan.hayward@arm.com>
Co-Authored-By: default avatarDavid Sherwood <david.sherwood@arm.com>

From-SVN: r242488
parent d964ba07
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment