On SystemZ, memory operands on the MIs that result from lowering of Memcpy (Memset is handled in a similar way) are currently missing.
I wanted to use the MachinePointerInfos passed to EmitTargetCodeForMemcpy(), but I did not find a simple way to just add them as an operand when calling DAG.getNode(). I therefore instead thought that since the achinePointerInfo is basically just a a Value and an offset, it might be good enough to just extract them
and reconstruct them during Pseudo Expansion.
It would of course have been nicer and cleaner to build SDNodes for these memory operands instead instead of extracting after isel. I however don't see any support for this... It seems MemSDNode has just one MachineMemOperand* as a protected member, so memcpy isn't supported with it, or? And there is no SDNode that would wrap a MachineMemOperand...
Is there any better way of doing this than per this patch? (I.e. making the memory operands in EmitTargetCodeForMemcpy() instead and passing them on through isel, to avoid the extraction).
Also, are these memory operands correct with just a load/store flag set?