arsenm wrote: > > runs before codegenprepare, which normally handles unsupported memcpy > > Not codegenprepare's job. Do you mean PreIselIntrinsicLowering? Plus not all the cases get expanded there https://github.com/llvm/llvm-project/pull/126621