[llvm-commits] Fix PR 13837: Optimization for vector creation from type conversion of another vector
Duncan Sands
baldrick at free.fr
Tue Sep 18 00:47:25 PDT 2012
Hi Weiming,
> Could someone kindly review the attached patch?
I already review this patch (and had several issues with it). Did you not get
my review?
Ciao, Duncan.
>
> This patch addresses PR 13837 (http://llvm.org/bugs/show_bug.cgi?id=13837 ):
>
> When a vector is created from type conversion, it generates multiple scalar
> conversion instead of a vectorized conversion.
>
> For example:
>
> int4 conv4i(float4 in)
>
> {
>
> int4 out={ (int)in.x, (int)in.y, (int)in.z, (int)in.w};
>
> return out;
>
> }
>
> Current LLVM first extracts each element of “in” and then does a fp-to-si for
> each element and then builds the result vector.
>
> This patch allows a vectorized fp-to-si conversion against the input vector
> directly, thus results in better performance.
>
> A set of unit tests are included in the patch as well.
>
> It passes all the test suite and no new fails for the unit test.
>
> Please review the attached patch.
>
> Thanks,
>
> Weiming
>
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>
More information about the llvm-commits
mailing list