https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69709
Richard Henderson <rth at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |rth at gcc dot gnu.org --- Comment #11 from Richard Henderson <rth at gcc dot gnu.org> --- Ho hum. I've been looking at this this afternoon too. Just to be sure we're on the same page, it's the insv splitters not handling overlapping inputs. diff --git a/gcc/config/s390/s390.md b/gcc/config/s390/s390.md index 2c90eae..a3f3f0a 100644 --- a/gcc/config/s390/s390.md +++ b/gcc/config/s390/s390.md @@ -3883,6 +3883,12 @@ (ashift:GPR (match_dup 3) (match_dup 4))))] { operands[5] = GEN_INT ((1UL << UINTVAL (operands[4])) - 1); + if (rtx_equal_p (operands[0], operands[3])) + { + if (!can_create_pseudo_p ()) + FAIL; + operands[3] = copy_to_reg (operands[3]); + } }) (define_split @@ -3903,6 +3909,12 @@ (clobber (reg:CC CC_REGNUM))])] { operands[5] = GEN_INT ((1UL << UINTVAL (operands[4])) - 1); + if (rtx_equal_p (operands[0], operands[3])) + { + if (!can_create_pseudo_p ()) + FAIL; + operands[3] = copy_to_reg (operands[3]); + } }) (define_insn "*r<noxa>sbg_<mode>_noshift"