[PATCH] D25866: [Sema] Support implicit scalar to vector conversions

Bruno Cardoso Lopes via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Mar 27 11:14:51 PDT 2017


bruno added inline comments.


================
Comment at: test/Sema/vector-gcc-compat.c:61
+  //        match.
+  v2i64_r = v2i64_a == 1; // expected-warning {{incompatible vector types assigning to 'v2i64' (vector of 2 'long long' values) from 'long __attribute__((ext_vector_type(2)))' (vector of 2 'long' values)}}
+  v2i64_r = v2i64_a != 1; // expected-warning {{incompatible vector types assigning to 'v2i64' (vector of 2 'long long' values) from 'long __attribute__((ext_vector_type(2)))' (vector of 2 'long' values)}}
----------------
sdardis wrote:
> bruno wrote:
> > Can you double check where 'long __attribute__((ext_vector_type(2)))' comes from?
> > 
> > We have regressed in the past year in the way ext-vector interacts with non-ext-vectors, and I don't wanna make it worse until we actually have time to fix that; there's a lot of code out there relying on bitcasts between ext-vectors and non-ext-vectors to bridge between intrinsics headers and ext-vector code.
> Sema::CheckVectorCompareOperands calls Sema::GetSignedVectorType which only returns ext-vector types. I presume that is now incorrect if we're producing vectors from literal scalars in the non OpenCL case.
Nice catch, can you please submit these specific changes as a separated patch and mark it as a prerequisite of this one?


https://reviews.llvm.org/D25866





More information about the cfe-commits mailing list