Fix power10 fusion and -fstack-protector, PR target/105325
This patch fixes an issue where if you use the -fstack-protector and
-mcpu=power10 options and you have a large stack frame, the GCC compiler will
generate a LWA instruction with a large offset.
There are several problems with the current GCC:
1) The constraints in fusion.md (generated by genfusion.pl) use "m" for LWA
and LD, when they should use "YZ".
2) The normal calls to address_is_non_pfx_d_or_x doesn't work with lwa,
because you need to pass in DImode instead of SImode. It is simplified
if you use the lwa_operand predicate instead of ds_form_mem_operand.
The fix is to modify genfusion.pl that it sets the "YZ" constraint instead of
"m" for the ld and lwa instructions.
I modified the genfusion.pl code use to use lwa_operand for the lwa instruction
to prevent prefixed addresses at combine time.
2023-06-08 Michael Meissner <meissner@linux.ibm.com>
gcc/
* config/rs6000/genfusion.pl (gen_ld_cmpi_p10_one): Fix problems that
allowed prefixed lwa to be generated.
* config/rs6000/fusion.md: Regenerate.