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
accesses.cc
accesses.h
blocks.cc
blocks.h
change-utils.h
changes.cc
changes.h
functions.cc
functions.h
insn-utils.h
insns.cc
insns.h
internals.h
internals.inl
is-a.inl
member-fns.inl
movement.h