On Feb 16, 2009, at 1:25 PM, Eli Friedman wrote:

> On Mon, Feb 16, 2009 at 1:11 PM, Chris Lattner <[email protected]>  
> wrote:
>> +  // ExtVectorElementExpr's base can either be a vector or pointer  
>> to vector.
>> +  if (const PointerType *PT = E->getBase()->getType()- 
>> >getAsPointerType()) {
>
> Ugly; ExtVectorElementExpr should have an isArrow() property.

Yes, thanks.

>
>> +    llvm::Value *Ptr = EmitScalarExpr(E->getBase());
>> +    Base = LValue::MakeAddr(Ptr, PT- 
>> >getPointeeType().getCVRQualifiers());
>
> Do we distinguish between a volatile vector and a vector with volatile
> elements?

No, we don't.  elements of the vector can't be volatile.  However, the  
code was broken because the computed cvr qualifiers we overwritten in  
the code below.  This is fixed in r64683.

> In any case, it's not very clean to be using
> getCVRQualifiers on a non-canonical type.

You're right.  Unfortunately, codegen gets this wrong in a ton of  
places :(

-Chris
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Reply via email to