[PATCH] DAGCombiner: Fold pointless truncate, bitcast, buildvector series
Arnold Schwaighofer
aschwaighofer at apple.com
Fri Feb 15 14:24:39 PST 2013
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.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-DAGCombiner-Fold-pointless-truncate-bitcast-buildvec.patch
Type: application/octet-stream
Size: 3560 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20130215/2e4338b6/attachment.obj>
-------------- next part --------------
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>
>
> Thanks
More information about the llvm-commits
mailing list