[LLVMdev] Memset/memcpy: user control of loop-idiom recognizer

Joerg Sonnenberger joerg at britannica.bec.de
Sun Dec 7 10:45:01 PST 2014


On Sun, Dec 07, 2014 at 11:13:51AM +1300, Bruce Hoult wrote:
> On Sun, Dec 7, 2014 at 10:48 AM, Joerg Sonnenberger <joerg at britannica.bec.de
> > wrote:
> 
> > On Sat, Dec 06, 2014 at 07:06:31AM -0600, Hal Finkel wrote:
> > >  - Direction (should the memory be traversed forward or backward)
> >
> > I don't think that this makes sense for memset and memcpy. It does
> > matter for memmove.
> >
> 
> This "memcpy" is being generated by pattern-matching an explicit loop in
> the code. Direction is certainly something that needs to be kept the same
> as the original loop, if there is overlap.

The memcpy intrinsic must not be generated in case of overlap.

Joerg



More information about the llvm-dev mailing list