On 01/13/2017 04:50 AM, Alan Modra wrote:
Rather than using unspecs in doloop insns to stop combine creating
these insns, use legitimate_combined_insn.
I'm not sure why the original patch implementing
legitimate_combined_insn did not store the result of recog to the insn
but it seems good to me, and would allow the recog call in
ix86_legitimate_combined_insn to be omitted. (I tested that too, not
shown here.)
Bootstrapped and regression tested powerpc64le-linux, powerpc64-linux,
x86_64-linux. OK for mainline?
PR target/72749
* combine.c (recog_for_combine_1): Set INSN_CODE before calling
target legitimate_combined_insn.
* config/rs6000/rs6000.c (TARGET_LEGITIMATE_COMBINED_INSN): Define.
(rs6000_legitimate_combined_insn): New function.
* config/rs6000/rs6000.md (UNSPEC_DOLOOP): Delete, and remove
all uses.
(ctr<mode>_internal3): Rename from *ctr<mode>_internal5.
(ctr<mode>_internal4): Rename from *ctr<mode>_internal6.
(ctr<mode>_internal1, ctr<mode>_internal2): Remove '*' from name.
OK on the combine.c changes. ppc maintainers own the rest.
jeff