tree-optimization/111583 - loop distribution issue

The following conservatively fixes loop distribution to only
recognize memset/memcpy and friends when at least one element
is going to be processed.  This avoids having an unconditional
builtin call in the IL that might imply the source and destination
pointers are non-NULL when originally pointers were not always

With -Os loop header copying is less likely to ensure this.

	PR tree-optimization/111583
	* (find_single_drs): Ensure the
	load/store are always executed.

	* gcc.dg/tree-ssa/pr111583-1.c: New testcase.
	* gcc.dg/tree-ssa/pr111583-2.c: Likewise.
3 files changed