Commit Graph

24173 Commits

Author SHA1 Message Date
Chris Lattner
4ad53bdd19 Rename BuildShuffleTable -> PerfectShuffle
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27738 91177308-0d34-0410-b5e6-96231b3b80d8
2006-04-17 00:35:34 +00:00
Chris Lattner
3033d4d375 rename the table
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27737 91177308-0d34-0410-b5e6-96231b3b80d8
2006-04-17 00:33:35 +00:00
Chris Lattner
27e98aa07c Initial checking of a perfect shuffle generation program for 4-element
Altivec vectors.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27736 91177308-0d34-0410-b5e6-96231b3b80d8
2006-04-17 00:30:41 +00:00
Evan Cheng
f0fc7fed66 Better way to splat v2f64
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27735 91177308-0d34-0410-b5e6-96231b3b80d8
2006-04-16 18:16:43 +00:00
Evan Cheng
06aef15843 movduprm, movshduprm bugs
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27734 91177308-0d34-0410-b5e6-96231b3b80d8
2006-04-16 18:11:28 +00:00
Evan Cheng
d8e8223ea1 Encoding bugs
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27733 91177308-0d34-0410-b5e6-96231b3b80d8
2006-04-16 07:02:22 +00:00
Evan Cheng
800f12df1e 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27732 91177308-0d34-0410-b5e6-96231b3b80d8
2006-04-16 06:58:19 +00:00
Chris Lattner
f3f69decca 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27731 91177308-0d34-0410-b5e6-96231b3b80d8
2006-04-16 01:37:57 +00:00
Chris Lattner
2efce0a589 Add support for promoting stores from one legal type to another, allowing us
to write one pattern for vector stores instead of 4.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27730 91177308-0d34-0410-b5e6-96231b3b80d8
2006-04-16 01:36:45 +00:00
Chris Lattner
b17f1679e3 Make the BUILD_VECTOR lowering code much more aggressive w.r.t constant vectors.
Remove some done items from the todo list.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27729 91177308-0d34-0410-b5e6-96231b3b80d8
2006-04-16 01:01:29 +00:00
Chris Lattner
7f6cc0ccb5 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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27728 91177308-0d34-0410-b5e6-96231b3b80d8
2006-04-16 00:51:47 +00:00
Chris Lattner
706126dac1 Canonicalize shuffle(undef,x,mask) -> shuffle(x, undef,mask').
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27727 91177308-0d34-0410-b5e6-96231b3b80d8
2006-04-16 00:03:56 +00:00
Chris Lattner
730b45694b Fix a crash when faced with a shuffle vector that has an undef in its mask.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27726 91177308-0d34-0410-b5e6-96231b3b80d8
2006-04-15 23:48:05 +00:00
Chris Lattner
6e94af75de Add patterns for matching vnots with bit converted inputs. Most of these will
go away when I start using evan's binop type canonicalizer


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27725 91177308-0d34-0410-b5e6-96231b3b80d8
2006-04-15 23:45:24 +00:00
Chris Lattner
1fcee4edf5 Add a new vnot_conv predicate for matching vnot's where the allones vector is
bitconverted from some other type.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27724 91177308-0d34-0410-b5e6-96231b3b80d8
2006-04-15 23:39:14 +00:00
Chris Lattner
547a16f273 Make these predicates return true for bit_convert(buildvector)'s as well as
buildvectors.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27723 91177308-0d34-0410-b5e6-96231b3b80d8
2006-04-15 23:38:00 +00:00
Evan Cheng
60d3fa24ba More encoding bugs
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27722 91177308-0d34-0410-b5e6-96231b3b80d8
2006-04-15 06:10:09 +00:00
Evan Cheng
1af18985b8 pslldrm, psrawrm, etc. encoding bug
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27721 91177308-0d34-0410-b5e6-96231b3b80d8
2006-04-15 05:59:08 +00:00
Evan Cheng
7076e2daee hsubp{s|d} encoding bug
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27720 91177308-0d34-0410-b5e6-96231b3b80d8
2006-04-15 05:52:42 +00:00
Evan Cheng
57ebe9fbf0 Silly bug
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27719 91177308-0d34-0410-b5e6-96231b3b80d8
2006-04-15 05:37:34 +00:00
Evan Cheng
39fc145995 Do not use movs{h|l}dup for a shuffle with a single non-undef node.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27718 91177308-0d34-0410-b5e6-96231b3b80d8
2006-04-15 03:13:24 +00:00
Chris Lattner
efb47359ff significant cleanups to code that uses insert/extractelt heavily. This builds
maximal shuffles out of them where possible.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27717 91177308-0d34-0410-b5e6-96231b3b80d8
2006-04-15 01:39:45 +00:00
Evan Cheng
407428e1ea Added SSE (and other) entries to foldMemoryOperand().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27716 91177308-0d34-0410-b5e6-96231b3b80d8
2006-04-14 23:33:27 +00:00
Evan Cheng
9ab1ac5e99 Some clean up
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27715 91177308-0d34-0410-b5e6-96231b3b80d8
2006-04-14 23:32:40 +00:00
Chris Lattner
b097aa9353 Allow undef in a shuffle mask
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27714 91177308-0d34-0410-b5e6-96231b3b80d8
2006-04-14 23:19:08 +00:00
Chris Lattner
f95670f6fc Move these ctors out of line
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27713 91177308-0d34-0410-b5e6-96231b3b80d8
2006-04-14 22:20:32 +00:00
Chris Lattner
6a56ed48b9 These instructions always return a packed vector. Improve the class definitions to expose this fact.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27712 91177308-0d34-0410-b5e6-96231b3b80d8
2006-04-14 22:20:07 +00:00
Evan Cheng
d953947d26 Last few SSE3 intrinsics.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27711 91177308-0d34-0410-b5e6-96231b3b80d8
2006-04-14 21:59:03 +00:00
Chris Lattner
de6df88529 Teach scalarrepl to promote unions of vectors and floats, producing
insert/extractelement operations.  This implements
Transforms/ScalarRepl/vector_promote.ll


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27710 91177308-0d34-0410-b5e6-96231b3b80d8
2006-04-14 21:42:41 +00:00
Chris Lattner
d8f5bd3988 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27709 91177308-0d34-0410-b5e6-96231b3b80d8
2006-04-14 21:41:54 +00:00
Tanya Lattner
0947429538 Adding back vector instructions to keep in mainline.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27704 91177308-0d34-0410-b5e6-96231b3b80d8
2006-04-14 19:24:33 +00:00
Tanya Lattner
36ba6d4d53 Removing unimplemented vector instructions from language referrence.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27703 91177308-0d34-0410-b5e6-96231b3b80d8
2006-04-14 19:07:42 +00:00
Reid Spencer
be5e85e9d3 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27701 91177308-0d34-0410-b5e6-96231b3b80d8
2006-04-14 14:11:48 +00:00
Reid Spencer
43fdfdcfd1 Allow an option, -with-externals, to be specified that provides the location
of the external tests. This turns into --with-externals option to configure.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27700 91177308-0d34-0410-b5e6-96231b3b80d8
2006-04-14 13:53:56 +00:00
Evan Cheng
f3e1b1d716 Misc. SSE2 intrinsics: clflush, lfench, mfence
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27699 91177308-0d34-0410-b5e6-96231b3b80d8
2006-04-14 07:43:12 +00:00
Evan Cheng
d9245ca1a1 We were not adjusting the frame size to ensure proper alignment when alloca /
vla are present in the function. This causes a crash when a leaf function
allocates space on the stack used to store / load with 128-bit SSE
instructions.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27698 91177308-0d34-0410-b5e6-96231b3b80d8
2006-04-14 07:26:43 +00:00
Evan Cheng
4f51d850da New entry
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27697 91177308-0d34-0410-b5e6-96231b3b80d8
2006-04-14 07:24:04 +00:00
Reid Spencer
e25fdafef9 Don't print out the install command for Intrinsics.gen unless VERBOSE mode.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27696 91177308-0d34-0410-b5e6-96231b3b80d8
2006-04-14 06:32:31 +00:00
Chris Lattner
3824e50b1e Make this assertion better
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27695 91177308-0d34-0410-b5e6-96231b3b80d8
2006-04-14 06:08:35 +00:00
Chris Lattner
619b2d23c9 Force a specific config, because this test fails in certain configs otherwise.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27694 91177308-0d34-0410-b5e6-96231b3b80d8
2006-04-14 06:06:51 +00:00
Chris Lattner
1a635d617a Move the rest of the PPCTargetLowering::LowerOperation cases out into
separate functions, for simplicity and code clarity.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27693 91177308-0d34-0410-b5e6-96231b3b80d8
2006-04-14 06:01:58 +00:00
Chris Lattner
f1b4708950 Pull the VECTOR_SHUFFLE and BUILD_VECTOR lowering code out into separate
functions, which makes the code much cleaner :)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27692 91177308-0d34-0410-b5e6-96231b3b80d8
2006-04-14 05:19:18 +00:00
Chris Lattner
0fa07f95b6 Implement value #'ing for vector operations, implementing
Regression/Transforms/GCSE/vectorops.ll


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27691 91177308-0d34-0410-b5e6-96231b3b80d8
2006-04-14 05:10:20 +00:00
Chris Lattner
b04d993d72 new testcase, vector operations should be CSE'd
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27690 91177308-0d34-0410-b5e6-96231b3b80d8
2006-04-14 05:09:53 +00:00
Chris Lattner
b04f706044 Remove this test, there is no need to test GCC's bugs
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27689 91177308-0d34-0410-b5e6-96231b3b80d8
2006-04-14 04:47:26 +00:00
Reid Spencer
57d37252b9 Ahem. HEAD -> 1.8cvs not 1.7 (I'm an idiot).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27687 91177308-0d34-0410-b5e6-96231b3b80d8
2006-04-14 03:01:27 +00:00
Reid Spencer
0667f6f327 remove the "cvs" part of the version number for the release branch.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27686 91177308-0d34-0410-b5e6-96231b3b80d8
2006-04-14 02:55:43 +00:00
Evan Cheng
bb5c43e73d pcmpeq* and pcmpgt* intrinsics.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27685 91177308-0d34-0410-b5e6-96231b3b80d8
2006-04-14 01:39:53 +00:00
Evan Cheng
0ac8ea9a4f psll*, psrl*, and psra* intrinsics.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27684 91177308-0d34-0410-b5e6-96231b3b80d8
2006-04-14 00:14:05 +00:00
Reid Spencer
7a1006c3f8 Remove the .cvsignore file so this directory can be pruned.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27683 91177308-0d34-0410-b5e6-96231b3b80d8
2006-04-13 22:00:10 +00:00