This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
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 03:37:16PM -0800, Janis Johnson wrote:
> 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++.
I missed the comment about why the test does NOT get warnings, when
in fact my point is that it DOES get warnings and should not, being a
builtin.
Does the 32-bit non-AltiVec ABI cover vectors that are not 16 bytes
(either smaller or larger) or whose component type is not supported
by AltiVec vectors?
Janis
- References:
- RE: PING^3 for PR target/17836, PR c/10735, PR c++/16882, PR rtl-optimization/17860[3.4]
- Re: PING^3 for PR target/17836, PR c/10735, PR c++/16882, PR rtl-optimization/17860[3.4]
- Re: PING^3 for PR target/17836, PR c/10735, PR c++/16882, PR rtl-optimization/17860[3.4]
- Re: PING^3 for PR target/17836, PR c/10735, PR c++/16882, PR rtl-optimization/17860[3.4]
- Re: PING^3 for PR target/17836, PR c/10735, PR c++/16882, PR rtl-optimization/17860[3.4]
- Re: PING^3 for PR target/17836, PR c/10735, PR c++/16882, PR rtl-optimization/17860[3.4]
- Re: PING^3 for PR target/17836, PR c/10735, PR c++/16882, PR rtl-optimization/17860[3.4]
- Re: PING^3 for PR target/17836, PR c/10735, PR c++/16882, PR rtl-optimization/17860[3.4]
- Re: PING^3 for PR target/17836, PR c/10735, PR c++/16882, PR rtl-optimization/17860[3.4]