<div dir="ltr">Hi Christian,<div><br></div><div>So consider the following IR:</div><div><br></div><div>define <2 x i32> @f(<2 x float> %p) {</div><div>  %1 = bitcast <2 x float> %p to <2 x i32></div>
<div>  ret <2 x i32> %1</div><div>}</div><div><br></div><div>That is totally possible to create (in fact, there is a conversion BIF in OpenCL that does exactly this! - "as_uint2"), and the mid and backends should handle *any* code the frontend may throw at it. It is not sufficient to only handle cases with obvious use cases. The LangRef tells you exactly what interface a backend must support.</div>
<div><br></div><div>Cheers,</div><div><br></div><div>James</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On 24 April 2014 15:52, Christian Pirker <span dir="ltr"><<a href="mailto:cpirker@a-bix.com" target="_blank">cpirker@a-bix.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi James,<br>
<br>
LLVM converts 128 bit vector types into 2x64 bit types (and vice versa) for the sake of function argument passing.<br>
That's the reason behind these bit conversions.<br>
I don't see any benefit in handling other types of vector conversions.<br>
<br>
Thanks,<br>
Christian<br>
<div class="HOEnZb"><div class="h5"><br>
<a href="http://reviews.llvm.org/D3424" target="_blank">http://reviews.llvm.org/D3424</a><br>
<br>
<br>
<br>
_______________________________________________<br>
llvm-commits mailing list<br>
<a href="mailto:llvm-commits@cs.uiuc.edu">llvm-commits@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits</a><br>
</div></div></blockquote></div><br></div>