[LLVMdev] Regression on <4 x i1>?

Duncan Sands baldrick at free.fr
Sat Dec 8 00:19:59 PST 2007

Hi Evan,

> Duncan, could this be related to your recent work?

it could well be.  That said, vectors with gaps in them are
broken in many ways.  This goes for vectors of apints like i1
as well as vectors of 80-bit x86 long double.

Here's an extract of an email I sent to Dale Johannesen:

> Hi Dale, I just noticed that vectors of x86_fp80 are likely
> to cause lots of trouble.  Plenty of vector logic seems to
> assume that the vector is densely packed, with no gaps due
> to alignment.  For example, the method that returns the size of a
> vector in bits (getBitWidth) returns the primitive size in bits of
> the element times the number of elements.  In other words
> it won't take into account the alignment padding of an x86_fp80.
> This is nasty because to get the alignment you need TargetData,
> so all of a sudden you need TargetData to compute the bitdwidth of a
> vector.
> Also, I was looking at scalar replacement of agregates, and
> the logic there looks pretty dubious for vectors of x86_fp80.
> For example, it thinks it is OK to treat vectors of x86_fp80
> and vectors of i80 the same:

How long is a <4 x i1>?  It's not 4 bits long (which is what
getBitWidth says), it's 4 bytes long.  I'm not sure this is
what Chuck wants...



More information about the llvm-dev mailing list