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: PING^3 for PR target/17836, PR c/10735, PR c++/16882, PR rtl-optimization/17860[3.4]


On Tue, Nov 23, 2004 at 05:49:01PM -0500, David Edelsohn wrote:
> >>>>> Janis Johnson writes:
> 
> Janis> With this patch, the following testcase gets a warning for "synthetic
> Janis> vector returned by reference" for -maltivec -mabi=no-altivec.  It's not
> Janis> a real call, just a call to an AltiVec builtin, so the warning isn't
> Janis> needed.
> 
> Janis> #include <altivec.h>
> Janis> extern vector int a1, a2, a3;
> Janis> void
> Janis> foo ()
> Janis> {
> Janis> a3 = vec_add (a1, a2);
> Janis> }
> 
> 	The only reason that it does not cause pass by reference warnings
> is that we specifically extended the 32-bit non-Altivec ABI when not
> ALTIVEC_ABI to pass by reference.
> 
> 	The two options seem to be:
> 
> 1) Implement similar exception for 32-bit non-Altivec ABI and return
> vectors by reference.
> 
> 2) Change test for large vectors to
> 
> 	(TARGET_ALTIVEC ||TARGET_ALTIVEC_ABI).
> 
> Any opinions?

My point for this particular example is that the call is to a builtin 
which is always inlined, so the ABI ought to be irrelevant.  The warning
is for both C and C++.

Janis


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