[Bug tree-optimization/78257] missing memcmp optimization with constant arrays

msebor at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Wed Nov 9 18:26:00 GMT 2016


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78257

--- Comment #4 from Martin Sebor <msebor at gcc dot gnu.org> ---
Created attachment 40008
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=40008&action=edit
Very lightly tested patch.

The attached (only superficially tested) patch changes fold_bultin_memcmp to
fold the comparison over the length of the arrays rather than just the first
pair of bytes.  Does it look reasonable?


More information about the Gcc-bugs mailing list