8sa1-gcc/gcc/rtl-ssa
Ilya Leoshkevich b61461ac7f fwprop: Fix single_use_p calculation
Commit efb6bc55a9 ("fwprop: Allow (subreg (mem)) simplifications")
introduced a check that was supposed to look at the propagated def's
number of uses.  It uses insn_info::num_uses (), which in reality
returns the number of uses def's insn has.  The whole change therefore
works only by accident.

Fix by looking at set_info's uses instead of insn_info's uses.  This
requires passing around set_info instead of insn_info.

gcc/ChangeLog:

2021-03-02  Ilya Leoshkevich  <iii@linux.ibm.com>

	* fwprop.c (fwprop_propagation::fwprop_propagation): Look at
	set_info's uses.
	(try_fwprop_subst_note): Use set_info instead of insn_info.
	(try_fwprop_subst_pattern): Likewise.
	(try_fwprop_subst_notes): Likewise.
	(try_fwprop_subst): Likewise.
	(forward_propagate_subreg): Likewise.
	(forward_propagate_and_simplify): Likewise.
	(forward_propagate_into): Likewise.
	* rtl-ssa/accesses.h (set_info::single_nondebug_use) New
	method.
	(set_info::single_nondebug_insn_use): Likewise.
	(set_info::single_phi_use): Likewise.
	* rtl-ssa/member-fns.inl (set_info::single_nondebug_use) New
	method.
	(set_info::single_nondebug_insn_use): Likewise.
	(set_info::single_phi_use): Likewise.

gcc/testsuite/ChangeLog:

	* gcc.target/s390/vector/long-double-asm-abi.c: New test.
2021-03-23 19:44:22 +01:00
..
access-utils.h Update copyright years. 2021-01-04 10:26:59 +01:00
accesses.cc rtl-ssa: Reduce the amount of temporary memory needed [PR98863] 2021-02-15 15:05:22 +00:00
accesses.h fwprop: Fix single_use_p calculation 2021-03-23 19:44:22 +01:00
blocks.cc rtl-ssa: Reduce the amount of temporary memory needed [PR98863] 2021-02-15 15:05:22 +00:00
blocks.h Update copyright years. 2021-01-04 10:26:59 +01:00
change-utils.h Update copyright years. 2021-01-04 10:26:59 +01:00
changes.cc rtl-ssa: Reduce the amount of temporary memory needed [PR98863] 2021-02-15 15:05:22 +00:00
changes.h Update copyright years. 2021-01-04 10:26:59 +01:00
functions.cc rtl-ssa: Reduce the amount of temporary memory needed [PR98863] 2021-02-15 15:05:22 +00:00
functions.h rtl-ssa: Reduce the amount of temporary memory needed [PR98863] 2021-02-15 15:05:22 +00:00
insn-utils.h Update copyright years. 2021-01-04 10:26:59 +01:00
insns.cc rtl-ssa: Reduce the amount of temporary memory needed [PR98863] 2021-02-15 15:05:22 +00:00
insns.h Update copyright years. 2021-01-04 10:26:59 +01:00
internals.h rtl-ssa: Reduce the amount of temporary memory needed [PR98863] 2021-02-15 15:05:22 +00:00
internals.inl rtl-ssa: Reduce the amount of temporary memory needed [PR98863] 2021-02-15 15:05:22 +00:00
is-a.inl Update copyright years. 2021-01-04 10:26:59 +01:00
member-fns.inl fwprop: Fix single_use_p calculation 2021-03-23 19:44:22 +01:00
movement.h Update copyright years. 2021-01-04 10:26:59 +01:00