Dale Johannesen
ffde4ff5b1
__DATA not __DATA__ is the right segment name on darwin.
...
Spotted by Nick Kledzik.
llvm-svn: 47037
2008-02-12 23:35:09 +00:00
Nate Begeman
bcc182f50d
Remove some dead code
...
llvm-svn: 47036
2008-02-12 22:54:40 +00:00
Nate Begeman
8ef50214f0
SSE4.1 64b integer insert/extract pattern support
...
Move formats into the formats file
llvm-svn: 47035
2008-02-12 22:51:28 +00:00
Owen Anderson
00dba4f734
Re-apply the patch to improve the optimizations of memcpy's, with several
...
bugs fixed. This now passes PPC bootstrap.
llvm-svn: 47026
2008-02-12 21:15:18 +00:00
Duncan Sands
f213e82bc5
Generalize getCopyFromParts and getCopyToParts to
...
handle arbitrary precision integers and any number
of parts. For example, on a 32 bit machine an i50
corresponds to two i32 parts. getCopyToParts will
extend the i50 to an i64 then write half of the i64
to each part; getCopyFromParts will combine the two
i32 parts into an i64 then truncate the result to
i50.
llvm-svn: 47024
2008-02-12 20:46:31 +00:00
Evan Cheng
83af1197ca
Revert r46916 PPCTargetAsmInfo.cpp.
...
llvm-svn: 47020
2008-02-12 19:25:12 +00:00
Evan Cheng
8a25d6ac53
Only using x86-64 rip relative addressing in non-staic mode?
...
llvm-svn: 47019
2008-02-12 19:20:46 +00:00
Wojciech Matyjewicz
1d2c27b23e
Fix PR2002. Suppose n is the initial value for the induction
...
variable (with step 1) and m is its final value. Then, the correct trip
count is SMAX(m,n)-n. Previously, we used SMAX(0,m-n), but m-n may
overflow and can't in general be interpreted as signed.
Patch by Nick Lewycky.
llvm-svn: 47007
2008-02-12 15:09:36 +00:00
Eli Friedman
716c10c01e
Fix for bug 1996: optimize out loads of undef. This code basically just
...
checks for a malloc/alloca immediately followed by a load.
llvm-svn: 47006
2008-02-12 12:08:14 +00:00
Evan Cheng
352acec37e
Update comment.
...
llvm-svn: 47002
2008-02-12 07:59:55 +00:00
Evan Cheng
4d8c98b8f9
Unbreak various insert_vector_elt and extract_vector_elt tests in presence of SSE4.
...
llvm-svn: 47001
2008-02-12 07:59:45 +00:00
Nate Begeman
fd82c308e5
Stuff noticed while grepping code
...
llvm-svn: 46979
2008-02-11 23:47:56 +00:00
Duncan Sands
a6ab6e7adb
Generalize the handling of call and return arguments,
...
in preparation for apint support. These changes are
intended to have no functional effect.
llvm-svn: 46967
2008-02-11 20:58:28 +00:00
Dan Gohman
11f6212bc0
From Chris' review: use isa instead of explicitly using classof.
...
llvm-svn: 46964
2008-02-11 19:00:34 +00:00
Dan Gohman
991056808b
From Chris' review: minor corrections in comments.
...
llvm-svn: 46963
2008-02-11 19:00:03 +00:00
Dan Gohman
54d3b5a1f5
From Chris' review: use cast instead of dyn_cast with an assert.
...
llvm-svn: 46962
2008-02-11 18:58:42 +00:00
Dan Gohman
7b5d916c98
From Chris' review: fix 80 column violations
...
llvm-svn: 46961
2008-02-11 18:57:43 +00:00
Wojciech Matyjewicz
adae053b53
If the LHS of the comparison is a loop-invariant we also want to move it
...
to the RHS. This simple change allows to compute loop iteration count
for loops with condition similar to the one in the testcase (which seems
to be quite common).
llvm-svn: 46959
2008-02-11 18:37:34 +00:00
Ted Kremenek
6f30a0798f
Added "Profile" method to APFloat for use with FoldingSet.
...
Added member template "Add" to FoldingSetNodeID that allows "adding" arbitrary
objects to a profile via dispatch to FoldingSetTrait<T>::Profile().
Removed FoldingSetNodeID::AddAPFloat and FoldingSetNodeID::APInt, as their
functionality is now replaced using the above mentioned member template.
llvm-svn: 46957
2008-02-11 17:24:50 +00:00
Wojciech Matyjewicz
d2d9764cc8
Fix PR1798 - an error in the evaluation of SCEVAddRecExpr at an
...
arbitrary iteration.
The patch:
1) changes SCEVSDivExpr into SCEVUDivExpr,
2) replaces PartialFact() function with BinomialCoefficient(); the
computations (essentially, the division) in BinomialCoefficient() are
performed with the apprioprate bitwidth necessary to avoid overflow;
unsigned division is used instead of the signed one.
Computations in BinomialCoefficient() require support from the code
generator for APInts. Currently, we use a hack rounding up the
neccessary bitwidth to the nearest power of 2. The hack is easy to turn
off in future.
One remaining issue: we assume the divisor of the binomial coefficient
formula can be computed accurately using 16 bits. It means we can handle
AddRecs of length up to 9. In future, we should use APInts to evaluate
the divisor.
Thanks to Nicholas for cooperation!
llvm-svn: 46955
2008-02-11 11:03:14 +00:00
Duncan Sands
7377f5fbe3
Add a isBigEndian method to complement isLittleEndian.
...
llvm-svn: 46954
2008-02-11 10:37:04 +00:00
Evan Cheng
ad4d57a2f5
Determine whether a spill kills the register it's spilling before insertion rather than trying to undo the kill marker afterwards.
...
llvm-svn: 46953
2008-02-11 08:30:52 +00:00
Nate Begeman
2d77e8e446
Enable SSE4 codegen and pattern matching.
...
Add some notes to the README.
llvm-svn: 46949
2008-02-11 04:19:36 +00:00
Nate Begeman
3090b0fbd1
additional missing feature
...
llvm-svn: 46948
2008-02-11 04:16:09 +00:00
Chris Lattner
dcddd64424
Fix scalarrepl to not 'miscompile' undefined code, part #2 .
...
This fixes the store case, my previous patch just fixed the load
case. rdar://5707076.
llvm-svn: 46932
2008-02-10 19:05:37 +00:00
Nate Begeman
3050f74a1d
xmm0 variable blends
...
llvm-svn: 46931
2008-02-10 18:47:57 +00:00
Dan Gohman
3a4be0fdef
Rename MRegisterInfo to TargetRegisterInfo.
...
llvm-svn: 46930
2008-02-10 18:45:23 +00:00
Duncan Sands
56689502c1
Add truncate and AssertZext result expansion.
...
llvm-svn: 46926
2008-02-10 10:08:52 +00:00
Bill Wendling
9c2ce9a32d
Return "(c1 + c2)" instead of yet another ADD node (which made this a
...
no-op).
llvm-svn: 46922
2008-02-10 08:10:24 +00:00
Chris Lattner
0ededbc68e
add anote
...
llvm-svn: 46918
2008-02-10 01:01:35 +00:00
Nick Lewycky
52ea27db17
Match GCC's behaviour for these sections.
...
llvm-svn: 46916
2008-02-10 00:03:54 +00:00
Nate Begeman
727c7634c7
memopv16i8 had wrong alignment requirement, would have broken pabsb
...
pabs{b,w,d} are not two address
fix extract-to-mem sse4 ops
add sse4 vector sign extend nodes
llvm-svn: 46915
2008-02-09 23:46:37 +00:00
Wojciech Matyjewicz
784d071e16
We should check that existing cast operation has the appropriate opcode before we reuse it.
...
llvm-svn: 46908
2008-02-09 18:30:13 +00:00
Evan Cheng
6aabf837fe
Remove unused hidden option.
...
llvm-svn: 46903
2008-02-09 08:36:28 +00:00
Nate Begeman
6715f755cc
Skeleton of insert and extract matching, more to come
...
llvm-svn: 46902
2008-02-09 01:38:08 +00:00
Nate Begeman
17bedbc500
Tablegen support for insert & extract element matching
...
llvm-svn: 46901
2008-02-09 01:37:05 +00:00
Chris Lattner
7f5c2553c7
check that terminators only occur at the end of a block. This catches the
...
common problem of putting two terminators in the same block. I can't write
a testcase for this because the .ll parser rejects this before the verifier
can, but this can occur when generating IR.
llvm-svn: 46900
2008-02-09 01:06:01 +00:00
Dan Gohman
65f63eba2b
Change ConstantSDNode to store an APInt instead of a uint64_t, and
...
begin adding some methods to use it this way.
llvm-svn: 46899
2008-02-08 22:59:30 +00:00
Devang Patel
26f75e2576
Fix PR 1995.
...
llvm-svn: 46898
2008-02-08 22:49:13 +00:00
Evan Cheng
f2bd1387b0
Forgot these files.
...
llvm-svn: 46896
2008-02-08 22:05:27 +00:00
Evan Cheng
e460869d86
Also print alignment.
...
llvm-svn: 46895
2008-02-08 22:05:07 +00:00
Evan Cheng
3b3286d4bc
It's not always safe to fold movsd into xorpd, etc. Check the alignment of the load address first to make sure it's 16 byte aligned.
...
llvm-svn: 46893
2008-02-08 21:20:40 +00:00
Dale Johannesen
36c2967d89
64-bit (MMX) vectors do not need restrictive alignment.
...
128-bit vectors need it only when SSE is on.
llvm-svn: 46890
2008-02-08 19:48:20 +00:00
Dan Gohman
7a55a94ba1
Avoid needlessly casting away const qualifiers.
...
llvm-svn: 46877
2008-02-08 03:29:40 +00:00
Dan Gohman
140a73efac
Avoid needlessly casting away const qualifiers.
...
llvm-svn: 46876
2008-02-08 03:26:46 +00:00
Evan Cheng
8d59dd119b
Added missing entries in X86 load / store folding tables.
...
llvm-svn: 46866
2008-02-08 00:12:56 +00:00
Evan Cheng
6a80462568
Remove remnant of load folding in local register allocator. Patch by Holger Schurig.
...
llvm-svn: 46861
2008-02-07 19:46:55 +00:00
Dan Gohman
16d4bc3dc0
Follow Chris' suggestion; change the PseudoSourceValue accessors
...
to return pointers instead of references, since this is always what
is needed.
llvm-svn: 46857
2008-02-07 18:41:25 +00:00
Dan Gohman
63a8452e9c
Add SourceValue information for outgoing argument stores on x86.
...
llvm-svn: 46854
2008-02-07 16:28:05 +00:00
Dan Gohman
b781c79d2c
Don't abort if a MemOperand is missing a SourceValue; just print it
...
as <unknown>. And make some minor adjustments to the MemOperand
dump format.
llvm-svn: 46853
2008-02-07 16:18:00 +00:00