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: [Patch PING]: Trivial gcc.dg/visibility-11.c fix for x86_64


Jan Hubicka wrote:

2006-07-03 Uros Bizjak <uros@kss-loka.si>

* gcc.dg/visibility-11.c: Enlarge test array to 1024 bytes to
avoid memcpy optimization.


This is OK for mainline, and for the gcc-4_1-branch as the same
testsuite failure shows up there? Thanks for fixing this.



Note that I have patch that will make memcpy inlines for 1024 bytes too
(it is still within limit where function call is measurable). I wouild
suggest adding at least two extra 0.


This would be a different problem. gcc.dg/visibility-11.c testcase uses -Os to make sure that memcpy is not expanded as "store by pieces" sequence. However, MOVE_MAX_PIECES is different for x86_64 than for i386:

#define MOVE_MAX_PIECES (TARGET_64BIT ? 8 : 4)

and memcpy is still expanded as "store by pieces", even for -Os, as the condition

#define STORE_BY_PIECES_P(SIZE, ALIGN) \
 (move_by_pieces_ninsns (SIZE, ALIGN, STORE_MAX_PIECES + 1) \
  < (unsigned int) MOVE_RATIO)

is true, where:

#define STORE_MAX_PIECES MIN (MOVE_MAX_PIECES, 2 * sizeof (HOST_WIDE_INT))

and

#define MOVE_RATIO (optimize_size ? 3 : ix86_cost->move_ratio)

Uros.


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