[PATCH] DAGCombiner: Fold pointless truncate, bitcast, buildvector series

Renato Golin renato.golin at linaro.org
Wed Feb 20 09:36:11 PST 2013


LGTM


On 20 February 2013 16:58, Nadav Rotem <nrotem at apple.com> wrote:

> LGTM.
>
>
> On Feb 20, 2013, at 5:40 AM, Arnold Schwaighofer <aschwaighofer at apple.com>
> wrote:
>
> > Ping.
> >
> >
> > On Feb 15, 2013, at 4:24 PM, Arnold Schwaighofer <
> aschwaighofer at apple.com> wrote:
> >
> >> Updated patch, moved the detailed explanation from the .ll test to
> llvm.org/bugs. We probably don't want this much text in an regression
> test.
> >>
> >>
> >> <0001-DAGCombiner-Fold-pointless-truncate-bitcast-buildvec.patch>
> >>
> >> Thanks
> >>
> >> On Feb 15, 2013, at 3:57 PM, Arnold Schwaighofer <
> aschwaighofer at apple.com> wrote:
> >>
> >>> For example (2xi32) (truncate ((2xi64) bitcast (buildvector i32 a, i32
> x, i32 b, i32 y)))
> >>> can be folded into a (2xi32) (buildvector i32 a, i32 b).
> >>>
> >>> Such a DAG would cause uneccessary vdup instructions followed by vmovn
> >>> instructions on ARM.
> >>>
> >>> We legalize to such a DAG on ARM NEON for a setcc olt, 2xf64, 2xf64.
> For example, in
> >>> the vectorized version of the code below.
> >>>
> >>> double A[N];
> >>> double B[N];
> >>>
> >>> void test_double_compare_to_double() {
> >>> int i;
> >>> for(i=0;i<N;i++)
> >>>  A[i] = (double)(A[i] < B[i]);
> >>> }
> >>>
> >>> <0001-DAGCombiner-Fold-pointless-truncate-bitcast-buildvec.patch>
> >
> >
> > <0001-DAGCombiner-Fold-pointless-truncate-bitcast-buildvec.patch>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20130220/e543deaa/attachment.html>


More information about the llvm-commits mailing list