i386: Merge duplicate preferred_for_speed attributes on QImode NDD patterns

Several QImode integer patterns has two separate attr "preferred_for_speed"
set, one gating the NDD memory-form alternatives with
TARGET_ENABLE_NDD_MEM, and the existing one is for !TARGET_PARTIAL_REG_STALL.
The later one will make genattrtab regenerates the cond based on
!PARTIAL_REG_STALL only and overrides the TARGET_ENABLE_NDD_MEM, so the NDD
memory alternatives were always preferred for speed regardless of the
X86_TUNE_ENABLE_NDD_MEM enabled or disabled.

Combine both conditions into a single preferred_for_speed cond per
pattern. For *ashlqi3_1 alternative 5 belongs to both sets, so it is
gated on TARGET_ENABLE_NDD_MEM && !TARGET_PARTIAL_REG_STALL.

gcc/ChangeLog:

	* config/i386/i386.md (*addqi_1<nf_name>): Merge the two
	preferred_for_speed attributes into one.
	(*andqi_1<nf_name>): Likewise.
	(*andqi_2_maybe_si): Likewise.
	(*<code>qi_1<nf_name>): Likewise.
	(*notxorqi_1): Likewise.
	(*one_cmplqi2_1): Likewise.
	(*ashlqi3_1<nf_name>): Likewise.

gcc/testsuite/ChangeLog:

	* gcc.target/i386/apx-ndd-mem-tune.c: New test.
2 files changed