public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
From: Daniel Egger <degger@fhm.edu>
To: Aldy Hernandez <aldyh@redhat.com>
Cc: GCC Developer Mailinglist <gcc@gcc.gnu.org>
Subject: Re: Altivec strangeness?
Date: Sat, 23 Feb 2002 16:50:00 -0000	[thread overview]
Message-ID: <1014463275.14780.15.camel@sonja> (raw)
In-Reply-To: <80C85A1C-27E4-11D6-BCEB-000393750C1E@redhat.com>

Am Fre, 2002-02-22 um 23.35 schrieb Aldy Hernandez:

> the above should be:
> blah vector signed short test = (vector signed short){1,2,3,etc};

I got it. It's like the Motorola crazyness but with {}'s instead of
parens.
 
> the altivec specs mention that you need a cast.  this is a context
> sensitivity issue.  gcc can't know what {1,2,3,etc} is.  perhaps
> the compiler you are using now uses context magic to figure out
> what type the initializer is... gcc won't do that.

Doesn't make sense to me. Isn't the compiler assuming that the rvalue
is of the same time as the lvalue of the assignment? Seems not, but why?
in 
vector signed short test = rhs;
for example it should be pretty clear that the right hand side is a 
vector signed short and if it's not the compiler should bail out with an
error.

> seriously, the (1) nonsense will work with jason merrill's patches
> but you'll have to apply those on your own.  but please don't.
> the hope is to wean people off of the parentheses nonsense-- alongside
> that, wean them off of the {1} stuff.  that just goes against
> C syntax.

It does, but how we one be able to represent a constant vector of
common values without typing them all? This is 
a) nasty because it requires a lot of typing.
b) not the fastest way because it will take memory and be loaded into
   memory while splatting might be faster and schedule better.

> warning will robbinson!  the vector initializer code is not, ahem,
> efficient. 

I noticed that. :)

> it will need to be rewritted with vector constants to
> yield better code, perhaps for 3.2.  but imo, that's not a big issue
> because you never initialize a vector inside a loop.

Why shouldn't I? If it's not invariant I might make sense to do that in
a loop for example to get working data into a vector register.

-- 
Servus,
       Daniel

  reply	other threads:[~2002-02-24  0:37 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-02-22  8:25 Daniel Egger
2002-02-22 14:36 ` Aldy Hernandez
2002-02-23 16:50   ` Daniel Egger [this message]
2002-02-24 16:00     ` Aldy Hernandez
2002-02-24 16:41       ` Daniel Egger
2002-02-24 18:16         ` Aldy Hernandez
2002-02-25  9:11           ` Daniel Egger
2002-02-25 18:46             ` Aldy Hernandez
2002-02-25  1:59 ` Jakub Jelinek
2002-02-25  7:17   ` Daniel Egger

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1014463275.14780.15.camel@sonja \
    --to=degger@fhm.edu \
    --cc=aldyh@redhat.com \
    --cc=gcc@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).