This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Patch] Fix PR 12086, add optimize of small size memcmp


This patch add optimization of small constant size of memcmp, it adds sizeof (long), sizeof(short), and sizeof(long long) (iff the sizeof(long long)<=sizeof(int)).
I also fixed a comment for when the length is one.


Bootstrapped and tested on i686-unknown-openbsd3.1.

OK?

Thanks,
Andrew Pinski


ChangeLog:
* builtins.c (expand_builtin_memcmp): Expand for sizeof(short),
sizeof(long), sizeof(long long), and sizeof(int) for the length. Fix comment when length is one.




Patch:

Attachment: memcmp.diff.txt
Description: Text document


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]