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] Adjust builtin-bswap-6/7


On 04/04/14 10:18, Andreas Krebbel wrote:
Hi,

the attached patch modifies the builtin-bswap-6/7 testcases in order
to prevent GCC from using math instead of a compare.  Only with a
compare the folding in combine actually takes place.

Whether the return value is produce with a compare or not depends
again on the value of branch cost.

Ideally we would be able to do the folding also with the math trick
but it is probably not that easy since we have already lost the
information that in the end all we need is a 0 or a 1.

Ok?

Bye,

-Andreas-

2014-04-04  Andreas Krebbel  <Andreas.Krebbel@de.ibm.com>

	* gcc.dg/builtin-bswap-6.c: Adjust return value to disable GCC
	optimization.
	* gcc.dg/builtin-bswap-7.c: Likewise.
OK.
Jeff


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