[llvm-commits] [PATCH] Teach SimplifyLibCalls about stpcpy

Duncan Sands baldrick at free.fr
Mon May 14 02:09:11 PDT 2012


Hi David,

> I briefly noticed that strcpy(x, x) for arbitrary x is always turned
> into a no-op. I figured that stpcpy can easily handle this case if we
> are willing to calculate strlen(x); this seems like it should always
> be a net win versus going to the library implementation of stpcpy.

don't forget to add a testcase for this feature.

Ciao, Duncan.



More information about the llvm-commits mailing list