Commit Graph

24072 Commits

Author SHA1 Message Date
Chris Lattner 147e50e1c5 Add a new way to match vector constants, which make it easier to bang bits of
different types.

Codegen spltw(0x7FFFFFFF) and spltw(0x80000000) without a constant pool load,
implementing PowerPC/vec_constants.ll:test1.  This compiles:

typedef float vf __attribute__ ((vector_size (16)));
typedef int vi __attribute__ ((vector_size (16)));
void test(vi *P1, vi *P2, vf *P3) {
  *P1 &= (vi){0x80000000,0x80000000,0x80000000,0x80000000};
  *P2 &= (vi){0x7FFFFFFF,0x7FFFFFFF,0x7FFFFFFF,0x7FFFFFFF};
  *P3 = vec_abs((vector float)*P3);
}

to:

_test:
        mfspr r2, 256
        oris r6, r2, 49152
        mtspr 256, r6
        vspltisw v0, -1
        vslw v0, v0, v0
        lvx v1, 0, r3
        vand v1, v1, v0
        stvx v1, 0, r3
        lvx v1, 0, r4
        vandc v1, v1, v0
        stvx v1, 0, r4
        lvx v1, 0, r5
        vandc v0, v1, v0
        stvx v0, 0, r5
        mtspr 256, r2
        blr

instead of (with two constant pool entries):

_test:
        mfspr r2, 256
        oris r6, r2, 49152
        mtspr 256, r6
        li r6, lo16(LCPI1_0)
        lis r7, ha16(LCPI1_0)
        li r8, lo16(LCPI1_1)
        lis r9, ha16(LCPI1_1)
        lvx v0, r7, r6
        lvx v1, 0, r3
        vand v0, v1, v0
        stvx v0, 0, r3
        lvx v0, r9, r8
        lvx v1, 0, r4
        vand v1, v1, v0
        stvx v1, 0, r4
        lvx v1, 0, r5
        vand v0, v1, v0
        stvx v0, 0, r5
        mtspr 256, r2
        blr

GCC produces (with 2 cp entries):

_test:
        mfspr r0,256
        stw r0,-4(r1)
        oris r0,r0,0xc00c
        mtspr 256,r0
        lis r2,ha16(LC0)
        lis r9,ha16(LC1)
        la r2,lo16(LC0)(r2)
        lvx v0,0,r3
        lvx v1,0,r5
        la r9,lo16(LC1)(r9)
        lwz r12,-4(r1)
        lvx v12,0,r2
        lvx v13,0,r9
        vand v0,v0,v12
        stvx v0,0,r3
        vspltisw v0,-1
        vslw v12,v0,v0
        vandc v1,v1,v12
        stvx v1,0,r5
        lvx v0,0,r4
        vand v0,v0,v13
        stvx v0,0,r4
        mtspr 256,r12
        blr

llvm-svn: 27624
2006-04-12 19:07:14 +00:00
Reid Spencer dc830e07b7 Add the llvm-config directory to the EXTRA_DIST line so it gets distributed
even though its not being built currently. This prevents dist-check from
failing because configure can't find llvm-config.in.in

llvm-svn: 27623
2006-04-12 19:06:14 +00:00
Chris Lattner 226eb56d2f new testcase
llvm-svn: 27622
2006-04-12 19:04:27 +00:00
Reid Spencer 78ede56ed0 Make sure that the C Frontend's runtime library directory is included as
a -L option to gccld whenever we're building a bytecode module or archive.
This gets around the "Cannot find library 'crtend'" warning messages.

llvm-svn: 27621
2006-04-12 18:21:35 +00:00
Chris Lattner b19a5c661b Turn casts into getelementptr's when possible. This enables SROA to be more
aggressive in some cases where LLVMGCC 4 is inserting casts for no reason.

This implements InstCombine/cast.ll:test27/28.

llvm-svn: 27620
2006-04-12 18:09:35 +00:00
Tanya Lattner bd4a203208 Added llvmgcc version to allow tests to be xfailed by frontend version.
llvm-svn: 27619
2006-04-12 18:08:25 +00:00
Chris Lattner 2122424fc1 These casts should turn into gep instructions
llvm-svn: 27618
2006-04-12 18:07:41 +00:00
Reid Spencer 175d57c4bc Don't emit useless warning messages.
llvm-svn: 27617
2006-04-12 17:56:16 +00:00
Chris Lattner b1dc436a94 Update adding an intrinsic to describe that you can now just plop it into the
target .td file instead of adding SDNodes etc.

llvm-svn: 27616
2006-04-12 17:42:39 +00:00
Andrew Lenharth e45e71a912 make recovering running_Olden data easier when the nightly tester eats the graphs
llvm-svn: 27615
2006-04-12 17:41:19 +00:00
Chris Lattner 74cf9ff761 Rename get_VSPLI_elt -> get_VSPLTI_elt
Canonicalize BUILD_VECTOR's that match VSPLTI's into a single type for each
form, eliminating a bunch of Pat patterns in the .td file and allowing us to
CSE stuff more aggressively.  This implements
PowerPC/buildvec_canonicalize.ll:VSPLTI

llvm-svn: 27614
2006-04-12 17:37:20 +00:00
Chris Lattner 21d74e7287 two equivalent vsplti*s in different types should be CSEd.
llvm-svn: 27613
2006-04-12 17:36:04 +00:00
Evan Cheng e2157c6e41 Promote v4i32, v8i16, v16i8 load to v2i64 load.
llvm-svn: 27612
2006-04-12 17:12:36 +00:00
Chris Lattner bd766cb681 Rename this file
llvm-svn: 27611
2006-04-12 17:01:11 +00:00
Chris Lattner ef18ab2bca Make this test more interesting by checking that the 0.0 used to implement vector fmul gets cse'd also.
llvm-svn: 27610
2006-04-12 16:57:39 +00:00
Chris Lattner e318a7574e Ensure that zero vectors are always v4i32, which forces them to CSE with
each other.  This implements CodeGen/PowerPC/vxor-canonicalize.ll

llvm-svn: 27609
2006-04-12 16:53:28 +00:00
Chris Lattner e4f274a291 new testcase
llvm-svn: 27608
2006-04-12 16:49:16 +00:00
Reid Spencer 1b8edd2f0c Make sure both member variables are initialized in the default constructor
for SDOperand. This gets rid of numerous warnings in lib/CodeGen and
lib/Target when compiled with GCC 4.0.2

llvm-svn: 27607
2006-04-12 16:44:15 +00:00
Evan Cheng be8a8933e6 Vector type promotion for ISD::LOAD and ISD::SELECT
llvm-svn: 27606
2006-04-12 16:33:18 +00:00
Chris Lattner 0574fca0e5 Provide a default impl of LowerArguments
llvm-svn: 27605
2006-04-12 16:21:12 +00:00
Chris Lattner d3b504ae10 Implement support for the formal_arguments node. To get this, targets shouldcustom legalize it and remove their XXXTargetLowering::LowerArguments overload
llvm-svn: 27604
2006-04-12 16:20:43 +00:00
Evan Cheng 29be057d92 Various SSE2 conversion intrinsics
llvm-svn: 27603
2006-04-12 05:20:24 +00:00
Chris Lattner 417b96b6dd Don't memoize vloads in the load map! Don't memoize them anywhere here, let
getNode do it.  This fixes CodeGen/Generic/2006-04-11-vecload.ll

llvm-svn: 27602
2006-04-12 03:25:41 +00:00
Chris Lattner 8d67500533 new testcase
llvm-svn: 27601
2006-04-12 03:24:46 +00:00
Reid Spencer ca4abfe3db Remove extraneous building in target dist-check. There is no reason that
a distribution should need to be able to make a distribution so eliminate
the "make dist" from the list of targets attempted.

llvm-svn: 27600
2006-04-12 03:07:02 +00:00
Evan Cheng 70c74a3ced Added __builtin_ia32_storelv4si, __builtin_ia32_movqv4si,
__builtin_ia32_loadlv4si, __builtin_ia32_loaddqu, __builtin_ia32_storedqu.

llvm-svn: 27599
2006-04-11 22:28:25 +00:00
Reid Spencer 81b7a3d200 Don't overload anchor names, silly browser's can't handle it.
llvm-svn: 27598
2006-04-11 22:02:18 +00:00
Reid Spencer 2f6341ee99 Add the contents of my email about distribution targets as a new section.
Attribute John as an author.

llvm-svn: 27597
2006-04-11 21:59:37 +00:00
Chris Lattner 3aa7764a1c new dag node
llvm-svn: 27596
2006-04-11 21:30:42 +00:00
John Criswell 4b8dfb989a First pass over Reid's document.
Changed the order of operations so that more of the fine tuning is
performed in the release branch.  This should free up mainline sooner to
resume development.
Removed information on the special release Makefile targets as I've never
used them for a release; Tanya is investigating their integration, and they
can be re-added if she uses them.
Added an outline for building the LLVM GCC binary distributions.  I will
be filling that section out later (but before the 1.7 release).

llvm-svn: 27595
2006-04-11 20:24:28 +00:00
Nate Begeman f19bcd5177 Fix SingleSource/UnitTests/Vector/sumarray-dbl
llvm-svn: 27594
2006-04-11 19:44:43 +00:00
Nate Begeman 1bb132099f Fix PR727, correctly handling large stack aligments on ppc
llvm-svn: 27593
2006-04-11 19:29:21 +00:00
Chris Lattner aaa04230bd we have a shuffle instr, add an example.
llvm-svn: 27592
2006-04-11 18:47:03 +00:00
Evan Cheng 6b60357f4a gcc lower SSE prefetch into generic prefetch intrinsic. Need to add support
later.

llvm-svn: 27591
2006-04-11 18:04:57 +00:00
Evan Cheng 6ea715af28 Misc. intrinsics.
llvm-svn: 27590
2006-04-11 17:35:57 +00:00
Jim Laskey 2d167e81d6 Update credibility.
llvm-svn: 27589
2006-04-11 08:16:45 +00:00
Jim Laskey 02b3b72bfc Suppress debug label when not debug.
llvm-svn: 27588
2006-04-11 08:11:53 +00:00
Evan Cheng 09a956271a movnt* and maskmovdqu intrinsics
llvm-svn: 27587
2006-04-11 06:57:30 +00:00
Evan Cheng 7256b0ae05 Only get Tmp2 for cases where number of operands is > 1. Fixed return void.
llvm-svn: 27586
2006-04-11 06:33:39 +00:00
Reid Spencer d79be6d06d Fix an anchor.
llvm-svn: 27585
2006-04-11 06:22:15 +00:00
Reid Spencer 76381db655 Flesh out the documentation a little bit more.
llvm-svn: 27584
2006-04-11 06:21:25 +00:00
Reid Spencer a6e1e8f9de Update my entry.
llvm-svn: 27583
2006-04-11 05:48:40 +00:00
Nate Begeman 98f844f094 update my credits entry per clattner's request!
llvm-svn: 27582
2006-04-11 05:47:45 +00:00
Jeff Cohen a7d7b9b754 Keep Visual Studio happy.
llvm-svn: 27581
2006-04-11 02:01:22 +00:00
Chris Lattner 6cf3bbbe17 add some todos
llvm-svn: 27580
2006-04-11 02:00:08 +00:00
Chris Lattner e4db08a2f1 Vector function results go into V2 according to GCC. The darwin ABI doc
doesn't say where they go :-/

llvm-svn: 27579
2006-04-11 01:38:39 +00:00
Chris Lattner 2eb22eef7d Add basic support for legalizing returns of vectors
llvm-svn: 27578
2006-04-11 01:31:51 +00:00
Chris Lattner 92533cfb4a Move some return-handling code from lowerarguments to the ISD::RET handling stuff.
No functionality change.

llvm-svn: 27577
2006-04-11 01:21:43 +00:00
Chris Lattner c10e9a0250 Add helper methods.
llvm-svn: 27576
2006-04-11 01:09:25 +00:00
Evan Cheng 12ba3e23d0 Added support for _mm_move_ss and _mm_move_sd.
llvm-svn: 27575
2006-04-11 00:19:04 +00:00