[PATCH] D35067: [x86, CGP] increase memcmp() expansion up to 4 load pairs
Simon Pilgrim via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jul 18 07:41:14 PDT 2017
RKSimon added a comment.
In https://reviews.llvm.org/D35067#812917, @joerg wrote:
> i386: code requires three push instructions + call + potential stack cleanup.
> x86_64: code requires three register loads + call
>
> memcmp expansion requires threeish instructions per unit of expansion? I'd say one unit of expansion for minsize, two for size and four for normal optimization sounds good correct? That includes a small bonus for less clobbering for size optimization. Maybe that's too pessimistic though.
Agreed, I'll limit optsize to two load-compare instead of four; minsize is hard coded to use memcmp, which is beyond the scope of this patch.
https://reviews.llvm.org/D35067
More information about the llvm-commits
mailing list