Uros Bizjak <ubiz...@gmail.com> writes: > On Thu, Jan 24, 2019 at 12:52 PM Richard Sandiford > <richard.sandif...@arm.com> wrote: > >> Another potential problem is that gen_move_insn should only really >> be used for general_operands. >> >> process_insert_insn seems to get this right, so it'd probably be >> cleanest to split the innards out into something that takes the dest >> and source rtxes of the move, then reuse that here. > > Something like the attached patch? > > 2019-01-24 Uroš Bizjak <ubiz...@gmail.com> > > PR target/88948 > * rtl.h (prepare_copy_insn): New prototype. > * gcse.c (prepare_copy_insn): New function, split out from > process_insert_insn. > (process_insert_insn): Use prepare_copy_insn. > * store-motion.c (replace_store_insn): Use prepare_copy_insn > instead of gen_move_insn. > > testsuite/ChangeLog: > > 2019-01-24 Uroš Bizjak <ubiz...@gmail.com> > > PR target/88948 > * gcc.target/i386/pr88948.c: New test. > > Bootstrap and regression test on x86_64-linux-gnu {,-m32} in progress.
OK if it passes, thanks. Richard