Clang error to emit llvm code

Hello All,

I want to obtain the LLVM IR of a program (pixel-test.c from pixman library), I am using the following command to obtain the LLVM IR representation of this program:

$ clang -fsyntax-only ./test/pixel-test.c -S -emit-llvm -o pixel-test.ll

However I get the following error:

./test/utils-prng.h:137:32: error: can't convert between vector values of different size ('uint32x4' and 'int')
    uint32x4 e = x->a - ((x->b << 27) + (x->b >> (32 - 27)));
                          ~~~~ ^ ~~
./test/utils-prng.h:137:47: error: can't convert between vector values of different size ('uint32x4' and 'int')
    uint32x4 e = x->a - ((x->b << 27) + (x->b >> (32 - 27)));
                                         ~~~~ ^ ~~~~~~~~~
./test/utils-prng.h:138:26: error: can't convert between vector values of different size ('uint32x4' and 'int')
    x->a = x->b ^ ((x->c << 17) ^ (x->c >> (32 - 17)));
                    ~~~~ ^ ~~
./test/utils-prng.h:138:41: error: can't convert between vector values of different size ('uint32x4' and 'int')
    x->a = x->b ^ ((x->c << 17) ^ (x->c >> (32 - 17)));

It looks like clang is having trouble to convert a vector data type to an integer. Is there a patch/workaround to be able to generate the LLVM IR?
I am using clang 3.9, I am attaching the source file that causes the error.

utils-prng.h (5.92 KB)

Hi Raul,

That process started the day we released 3.9 AFAIK.

I think Tom (+CC) would like a bugzilla entry for every cherry-pick request.

Thought I remembered something like that but I wasn't sure. I've filed PR30688.

Tim.