Benjamin Kramer
42d262f410
Allow SelectionDAG::FoldConstantArithmetic to work when it's called with a vector VT but scalar values.
...
llvm-svn: 207835
2014-05-02 12:35:22 +00:00
Benjamin Kramer
3693e77cb4
X86: If SSE4.1 is missing lower SMUL_LOHI of v4i32 to pmuludq and fix up the high parts.
...
This is more expensive than pmuldq but still cheaper than scalarizing the whole thing.
llvm-svn: 207370
2014-04-27 18:47:41 +00:00
Benjamin Kramer
6bca8ef667
SelectionDAG: Aggressively fold shuffles of constant splats.
...
llvm-svn: 207352
2014-04-27 11:41:06 +00:00
Benjamin Kramer
da4841b3a9
DAGCombiner: Simplify code a bit, make more transforms work with vectors.
...
llvm-svn: 207338
2014-04-26 23:09:49 +00:00
Benjamin Kramer
6d2dff61f9
X86: Lower SMUL_LOHI of v4i32 to pmuldq when SSE4.1 is available.
...
llvm-svn: 207318
2014-04-26 14:12:19 +00:00
Benjamin Kramer
c9827ab103
X86: Add patterns for MULHU/MULHS of v8i16 and v16i16.
...
This gets us pretty code for divs of i16 vectors. Turn the existing
intrinsics into the corresponding nodes.
llvm-svn: 207317
2014-04-26 13:01:03 +00:00
Benjamin Kramer
4dae598bc8
DAGCombiner: Turn divs of vector splats into vectorized multiplications.
...
Otherwise the legalizer would just scalarize everything. Support for
mulhi in the targets isn't that great yet so on most targets we get
exactly the same scalarized output. Add a test for x86 vector udiv.
I had to disable the mulhi nodes on ARM because there aren't any patterns
for it. As far as I know ARM has instructions for getting the high part of
a multiply so this should be fixed.
llvm-svn: 207315
2014-04-26 12:06:28 +00:00