[PATCH] DAGCombiner: Fold pointless truncate, bitcast, buildvector series
Arnold Schwaighofer
aschwaighofer at apple.com
Wed Feb 20 05:40:58 PST 2013
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>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-DAGCombiner-Fold-pointless-truncate-bitcast-buildvec.patch
Type: application/octet-stream
Size: 3564 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20130220/f246868a/attachment.obj>
More information about the llvm-commits
mailing list