Chris Lattner
2d8d6c9feb
Make some code more general, adding support for constant formation of several
...
new patterns.
llvm-svn: 27754
2006-04-17 06:58:41 +00:00
Chris Lattner
f0fc91e4d7
New testcases
...
llvm-svn: 27753
2006-04-17 06:58:16 +00:00
Chris Lattner
9dd4ebffca
Learn how to make odd splatted constants in range [17,29]. This implements
...
PowerPC/vec_constants.ll:test_29.
llvm-svn: 27752
2006-04-17 06:07:44 +00:00
Chris Lattner
fb4fb42e54
new testcase
...
llvm-svn: 27751
2006-04-17 06:06:50 +00:00
Chris Lattner
72a67a5b1f
Pull some code out into a helper function.
...
Effeciently codegen even splats in the range [-32,30].
This allows us to codegen <30,30,30,30> as:
vspltisw v0, 15
vadduwm v2, v0, v0
instead of as a cp load.
llvm-svn: 27750
2006-04-17 06:00:21 +00:00
Chris Lattner
78ab345316
New testcase
...
llvm-svn: 27749
2006-04-17 05:58:22 +00:00
Chris Lattner
5367a73dec
Implement a TODO: for any shuffle that can be viewed as a v4[if]32 shuffle,
...
if it can be implemented in 3 or fewer discrete altivec instructions, codegen
it as such. This implements Regression/CodeGen/PowerPC/vec_perf_shuffle.ll
llvm-svn: 27748
2006-04-17 05:28:54 +00:00
Chris Lattner
dc4f42f75d
new testcase, these shuffles can be implemented with discrete instructions,
...
and shouldn't be lowered to vperm.
llvm-svn: 27747
2006-04-17 05:27:31 +00:00
Chris Lattner
34ec6432f6
Regenerate with adjusted costs
...
llvm-svn: 27746
2006-04-17 05:26:20 +00:00
Chris Lattner
81fa159ca9
Encode a cost of zero as a cost of 1.
...
llvm-svn: 27745
2006-04-17 05:25:16 +00:00
Chris Lattner
36ceea9e96
Regenerate with correct offset
...
llvm-svn: 27744
2006-04-17 05:08:46 +00:00
Chris Lattner
d134f32a85
Really, I can count!
...
llvm-svn: 27743
2006-04-17 05:05:52 +00:00
Chris Lattner
671f50cf33
Increase the opcodes by one each to disambiguate COPY from VMRGHW.
...
llvm-svn: 27742
2006-04-17 00:47:48 +00:00
Chris Lattner
aee09fc8aa
assign stable opcodes to the various altivec ops.
...
llvm-svn: 27741
2006-04-17 00:47:18 +00:00
Chris Lattner
dab7d994ef
PPCPerfectShuffle.h is autogenerated, don't include it in the LOC counts.
...
llvm-svn: 27740
2006-04-17 00:46:09 +00:00
Chris Lattner
99ee809cb6
Check in a table, generated by llvm-PerfectShuffle, of optimal shuffles
...
of various 4-element vectors.
llvm-svn: 27739
2006-04-17 00:37:02 +00:00
Chris Lattner
dd8376ca78
Rename BuildShuffleTable -> PerfectShuffle
...
llvm-svn: 27738
2006-04-17 00:35:34 +00:00
Chris Lattner
4833bf9285
rename the table
...
llvm-svn: 27737
2006-04-17 00:33:35 +00:00
Chris Lattner
a6a36551d3
Initial checking of a perfect shuffle generation program for 4-element
...
Altivec vectors.
llvm-svn: 27736
2006-04-17 00:30:41 +00:00
Evan Cheng
087af2ecda
Better way to splat v2f64
...
llvm-svn: 27735
2006-04-16 18:16:43 +00:00
Evan Cheng
68b2e5b4b0
movduprm, movshduprm bugs
...
llvm-svn: 27734
2006-04-16 18:11:28 +00:00
Evan Cheng
26d917789c
Encoding bugs
...
llvm-svn: 27733
2006-04-16 07:02:22 +00:00
Evan Cheng
b2e3339cb2
Can't fold loads into alias vector SSE ops used for scalar operation. The load
...
address has to be 16-byte aligned but the values aren't spilled to 128-bit
locations.
llvm-svn: 27732
2006-04-16 06:58:19 +00:00
Chris Lattner
d86516991a
Implement a TODO: have the legalizer canonicalize a bunch of operations to
...
one type (v4i32) so that we don't have to write patterns for each type, and
so that more CSE opportunities are exposed.
llvm-svn: 27731
2006-04-16 01:37:57 +00:00
Chris Lattner
c2f3923b63
Add support for promoting stores from one legal type to another, allowing us
...
to write one pattern for vector stores instead of 4.
llvm-svn: 27730
2006-04-16 01:36:45 +00:00
Chris Lattner
f4126f0db7
Make the BUILD_VECTOR lowering code much more aggressive w.r.t constant vectors.
...
Remove some done items from the todo list.
llvm-svn: 27729
2006-04-16 01:01:29 +00:00
Chris Lattner
4422d3de1b
Fix a bug in the 'shuffle(undef,x,mask) -> shuffle(x, undef,mask')' xform
...
Make the insert/extract elt -> shuffle code more aggressive.
This fixes CodeGen/PowerPC/vec_shuffle.ll
llvm-svn: 27728
2006-04-16 00:51:47 +00:00
Chris Lattner
da260db137
Canonicalize shuffle(undef,x,mask) -> shuffle(x, undef,mask').
...
llvm-svn: 27727
2006-04-16 00:03:56 +00:00
Chris Lattner
44245f11c3
Fix a crash when faced with a shuffle vector that has an undef in its mask.
...
llvm-svn: 27726
2006-04-15 23:48:05 +00:00
Chris Lattner
2ede0fef98
Add patterns for matching vnots with bit converted inputs. Most of these will
...
go away when I start using evan's binop type canonicalizer
llvm-svn: 27725
2006-04-15 23:45:24 +00:00
Chris Lattner
254683a3df
Add a new vnot_conv predicate for matching vnot's where the allones vector is
...
bitconverted from some other type.
llvm-svn: 27724
2006-04-15 23:39:14 +00:00
Chris Lattner
918dbf7203
Make these predicates return true for bit_convert(buildvector)'s as well as
...
buildvectors.
llvm-svn: 27723
2006-04-15 23:38:00 +00:00
Evan Cheng
9f33b2abc5
More encoding bugs
...
llvm-svn: 27722
2006-04-15 06:10:09 +00:00
Evan Cheng
87e0cd1569
pslldrm, psrawrm, etc. encoding bug
...
llvm-svn: 27721
2006-04-15 05:59:08 +00:00
Evan Cheng
4487cf8125
hsubp{s|d} encoding bug
...
llvm-svn: 27720
2006-04-15 05:52:42 +00:00
Evan Cheng
32e5d4f6bc
Silly bug
...
llvm-svn: 27719
2006-04-15 05:37:34 +00:00
Evan Cheng
f9a93a1d3f
Do not use movs{h|l}dup for a shuffle with a single non-undef node.
...
llvm-svn: 27718
2006-04-15 03:13:24 +00:00
Chris Lattner
055889cfb9
significant cleanups to code that uses insert/extractelt heavily. This builds
...
maximal shuffles out of them where possible.
llvm-svn: 27717
2006-04-15 01:39:45 +00:00
Evan Cheng
300456c7f2
Added SSE (and other) entries to foldMemoryOperand().
...
llvm-svn: 27716
2006-04-14 23:33:27 +00:00
Evan Cheng
c626c9bb00
Some clean up
...
llvm-svn: 27715
2006-04-14 23:32:40 +00:00
Chris Lattner
5c9d357d7c
Allow undef in a shuffle mask
...
llvm-svn: 27714
2006-04-14 23:19:08 +00:00
Chris Lattner
5ecb2adcc6
Move these ctors out of line
...
llvm-svn: 27713
2006-04-14 22:20:32 +00:00
Chris Lattner
5324c4f9aa
These instructions always return a packed vector. Improve the class definitions to expose this fact.
...
llvm-svn: 27712
2006-04-14 22:20:07 +00:00
Evan Cheng
32c4470374
Last few SSE3 intrinsics.
...
llvm-svn: 27711
2006-04-14 21:59:03 +00:00
Chris Lattner
b3cae60d0b
Teach scalarrepl to promote unions of vectors and floats, producing
...
insert/extractelement operations. This implements
Transforms/ScalarRepl/vector_promote.ll
llvm-svn: 27710
2006-04-14 21:42:41 +00:00
Chris Lattner
dc53296ea1
New testcase, checking to see we can turn this code:
...
void test(vector float *F, float f) {
vector float G = *F + *F;
*((float*)&G) = f;
*F = G + G;
}
void test2(vector float *F, float f) {
vector float G = *F + *F;
((float*)&G)[2] = f;
*F = G + G;
}
void test3(vector float *F, float *f) {
vector float G = *F + *F;
*f = ((float*)&G)[2];
}
void test4(vector float *F, float *f) {
vector float G = *F + *F;
*f = *((float*)&G);
}
into insert/extract element operations with no memory traffic.
llvm-svn: 27709
2006-04-14 21:41:54 +00:00
Tanya Lattner
72a79541a8
Adding back vector instructions to keep in mainline.
...
llvm-svn: 27704
2006-04-14 19:24:33 +00:00
Tanya Lattner
61fcf9afdf
Removing unimplemented vector instructions from language referrence.
...
llvm-svn: 27703
2006-04-14 19:07:42 +00:00
Reid Spencer
68923074ca
Correct the Superclasses list for GlobalVariable and Function to indicate
...
that they are "Constant" as they derive from GlobalValue. Also, fix some of
the wording where it mentions this.
Patch inspired by Nai Xia.
llvm-svn: 27701
2006-04-14 14:11:48 +00:00
Reid Spencer
860522ab68
Allow an option, -with-externals, to be specified that provides the location
...
of the external tests. This turns into --with-externals option to configure.
llvm-svn: 27700
2006-04-14 13:53:56 +00:00