[PATCH] memcpy lowering: use "rep movs" even when esi is used as base pointer
grosbach at apple.com
Mon Mar 17 11:47:37 PDT 2014
In general, physical register references like this are very dangerous and won’t play nicely with the rest of the code. It’s possible the glue here will work around that, but it still seems pretty dodgy. Sometimes when we need an enforced instruction ordering, we use a pseudo-instruction that gets expanded very late (sometimes as late as the MC lowering).
I’m not expert on the assumptions the x86 backend makes about ESI, so I don’t have a very good feel for how safe/unsafe this change really is, unfortunately.
More information about the llvm-commits