This is the mail archive of the gcc@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: Help restricting args of an intrinsic function


On Monday, February 2, 2004, at 03:26 PM, Joe Buck wrote:
On Fri, Jan 30, 2004 at 07:59:34PM -0800, Mike Stump wrote:
On Friday, January 30, 2004, at 05:38 PM, Diego Novillo wrote:
Yes, that's fine.  Here's what tree-ssa emits after the tree
optimization passes for the test cases you mentioned.

So, does your scheme work when the optimizer is off (-O0)?


If not, why would that be a solution?

Who says that exactly one instruction must be emitted with the optimizer
off? It seems to me that it would suffice to have the builtin function
emit the one instruction in the case where the mask arguments, after any
optimization, are constant, and otherwise emit whatever code is needed to
compute the correct result (or simply emit a call to a library function).

This violates the users expectations.


The _point_ of having builtins for single machine instructions is so that the generated code will use them (or something better). Tweaking a builtin to generate an external lib call or 5 instructions instead of using that one machine instruction isn't, uhm, winning.

The one case were it would be winning, is if you wanted to use x86 builtins on the ppc and the compiler did its best to make it just work.


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