https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78041
--- Comment #3 from Bernd Edlinger <bernd.edlinger at hotmail dot de> --- (In reply to Wilco from comment #2) > (In reply to Bernd Edlinger from comment #1) > > some background about this bug can be found here: > > > > https://gcc.gnu.org/ml/gcc-patches/2016-10/msg01561.html > > The <shift>di3_neon pattern does not constrain the input not to overlap with > the output for immediate shifts, and the arm_emit_coreregs_64bit_shift code > does not handle partial overlaps. However it is feasible to fix that by > swapping the order for the various cases. from <shift>di3_neon: if (INTVAL (operands[2]) < 1) { emit_insn (gen_movdi (operands[0], operands[1])); DONE; } Will the movdi pattern work with partial overlaps? It does basically this: emit_move_insn (gen_lowpart (SImode, operands[0]), gen_lowpart (SImode, operands[1])); emit_move_insn (gen_highpart (SImode, operands[0]), gen_highpart (SImode, operands[1]));