Skip to content
Snippets Groups Projects
Commit cb9badea authored by Jeff Law's avatar Jeff Law
Browse files

[committed] Fix various sh define_insn_and_split predicates

The sh4-linux-gnu port has failed to bootstrap since the introduction of late
combine due to failures to split certain insns.

This is caused by incorrect predicates in various define_insn_and_split
patterns.  Essentially the insn's predicate is something like "TARGET_SH1".
The split predicate is "&& can_create_pseudos_p ()".  So these patterns will
match post-reload, but be un-splittable.  So at assembly output time, we get
the failure as the output template is "#".

This patch fixes the most obvious & egregious cases by bringing the split
condition into the insn's predicate and leaving "&& 1" as the split condition.
That's enough to get sh4-linux-gnu bootstrapping again and I'm hoping it does
the same for sh4eb-linux-gnu.

Pushing to the trunk.

gcc/
	* config/sh/sh.md (adddi3): Only allow matching when we can
	still create new pseudos.
	(subdi3, *rotcl, *rotcr, *rotcr_neg_t, negdi2): Likewise.
	(abs<mode>2, negabs<mode>2, negdi_cond): Likewise.
	(*swapbisi2_and_shl8, *swapbhisi2, *movsi_index_disp_load): Likewise.
	(*movhi_index_disp_load, *mov<mode>index_disp_store): Likewise.
	(*mov_t_msb_neg, *negt_msb, clipu_one): Likewise.
parent 96559be7
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment