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]

Re: Thoughts on memcmp expansion (PR43052)


On 05/13/2016 12:20 PM, Richard Biener wrote:
I'm not much of a fan of C++-ification (in this case it makes review
harder) but well ...

I felt it was a pretty natural way to structure the code to avoid duplicating the same logic across more functions, and we might as well use the language for such purposes given that we've bothered to switch.

+  if (tree_fits_uhwi_p (len)
+      && (leni = tree_to_uhwi (len)) <= GET_MODE_SIZE (word_mode)
+      && exact_log2 (leni) != -1
+      && (align1 = get_pointer_alignment (arg1)) >= leni * BITS_PER_UNIT
+      && (align2 = get_pointer_alignment (arg2)) >= leni * BITS_PER_UNIT)

I think * BITS_PER_UNIT has to be * 8 here as the C standard defines
it that way.

Huh? Can you elaborate?

[...]
Ok with those changes.

Thanks. I won't be reading email for the next two weeks, so I'll be checking it in afterwards.


Bernd


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