This is the mail archive of the 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: broken arithmetic operations on vectors (c and c++)

On Mon, 13 Jun 2005 08:29:28 -0700, Mark Mitchell <> wrote:

> Jason Merrill wrote:
>> On Mon, 13 Jun 2005 09:25:14 -0400, Aldy Hernandez <> wrote:
>>>In keeping with the C front end, I think we should allow arithmetic
>>>between same type vectors with different signs.  I tried to use comptypes,
>>>and a few other functions to no avail.  The easiest thing I could think
>>>of was using the mode.  Is this correct?
>> It seems like a bit of a kludge, but probably fine.
> I don't think this is correct.
> I think we should be checking that we need a predicate for
> same_type_ignoring_signedness.  That's not hard to implement.
> Any time we're looking at TYPE_MODE in a front end, we're being lazy, at
> best.

That was my initial reaction, too, but then I thought that the types are
specified using modes, so I wasn't sure whether multiple vectors of the
same mode would have the same type...  But that does seem like a good
invariant, and it also seems that make_vector_type does commonize the
vector types properly.

So yes, I agree with Mark.


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