[cfe-dev] More cases not supported RE: Clang doesn't support Logical Operator supported in GCC Vector Extension?

Yin Ma yinma at codeaurora.org
Mon Oct 24 14:59:38 PDT 2011


Hi,

typedef float  float4 __attribute__((ext_vector_type(4)));
typedef long   long4 __attribute__((ext_vector_type(4)));
typedef int    int4 __attribute__((ext_vector_type(4)));


int main()
{
  float4 af, bf;
  long4  al, bl;
  int4 ret;
  
  ret = (bf != af);
  ret = (bl != al);     
  
  return 0;
};

k.c:13:7: error: assigning to 'int4' from incompatible type 'long4';
  ret = (bl != al);
      ^ ~~~~~~~~~~

Clang is not supporting the GCC Vector Extension in this case. 
Does anybody know if there is a plan to fix this?

Thanks,

                            Yin 


-----Original Message-----
From: Eli Friedman [mailto:eli.friedman at gmail.com] 
Sent: Friday, October 21, 2011 12:05 PM
To: Yin Ma
Subject: Re: [cfe-dev] Clang doesn't support Logical Operator supported in
GCC Vector Extension?

On Fri, Oct 21, 2011 at 11:58 AM, Yin Ma <yinma at codeaurora.org> wrote:
> Hi Eli,
>
>   Sorry, I reduced too much.
> This is the case, my clang doesn’t support.
> I think my clang was checked out on Sep 27.
>
> typedef float float4 __attribute__((ext_vector_type(4)));
>
> void f() {
>   float4 a;
>   float4 b;
>   float4 c;
>   a = b > c ? b : c;
> }

Ah, hmm... looks like we only support vector select in OpenCL mode at
the moment.

-Eli





More information about the cfe-dev mailing list