Misha Brukman
5cbf223916
Removed trailing whitespace from Makefiles.
...
llvm-svn: 61991
2009-01-09 16:44:42 +00:00
Dan Gohman
bdc0f8b627
Add load-folding table entries for MOVDQA.
...
llvm-svn: 61972
2009-01-09 02:40:34 +00:00
Dan Gohman
e907a0a527
Whitespace and other minor adjustments to make SSE instructions have
...
the same formatting as their corresponding SSE2 instructions, for
consistency.
llvm-svn: 61971
2009-01-09 02:27:34 +00:00
Devang Patel
f646668799
Convert DwarfWriter into a pass.
...
Now Users request DwarfWriter through getAnalysisUsage() instead of creating an instance of DwarfWriter object directly.
llvm-svn: 61955
2009-01-08 23:40:34 +00:00
Dan Gohman
8e8d1da35a
Add patterns to match conditional moves with loads folded
...
into their left operand, rather than their right. Do this
by commuting the operands and inverting the condition.
llvm-svn: 61842
2009-01-07 01:00:24 +00:00
Dan Gohman
1e6e9a8b9b
Add load-folding table entries for cmovno too.
...
llvm-svn: 61841
2009-01-07 00:44:53 +00:00
Dan Gohman
7e47cc7cda
Define instructions for cmovo and cmovno.
...
llvm-svn: 61836
2009-01-07 00:35:10 +00:00
Dan Gohman
33e6fcd56f
X86_COND_C and X86_COND_NC are alternate mnemonics for
...
X86_COND_B and X86_COND_AE, respectively.
llvm-svn: 61835
2009-01-07 00:15:08 +00:00
Dan Gohman
beac19e299
Revert r42653 and forward-port the code that lets INC64_32r be
...
converted to LEA64_32r in x86's convertToThreeAddress. This
replaces code like this:
movl %esi, %edi
inc %edi
with this:
lea 1(%rsi), %edi
which appears to be beneficial.
llvm-svn: 61830
2009-01-06 23:34:46 +00:00
Bill Wendling
f9b5ba7bcb
Revert r61415 and r61484. Duncan was correct that these weren't needed.
...
llvm-svn: 61765
2009-01-05 22:53:45 +00:00
Dan Gohman
906152a20f
Tidy up #includes, deleting a bunch of unnecessary #includes.
...
llvm-svn: 61715
2009-01-05 17:59:02 +00:00
Devang Patel
56a8bb670f
squash warnings.
...
llvm-svn: 61707
2009-01-05 17:31:22 +00:00
Evan Cheng
c3b09c3baa
Atom and Core i7 do not have same model number after all.
...
llvm-svn: 61686
2009-01-05 08:45:01 +00:00
Evan Cheng
6e100a62b1
Add Intel processors core i7 and atom.
...
llvm-svn: 61603
2009-01-03 04:24:44 +00:00
Evan Cheng
9a3ec1b208
Fix PR3210: Detect more Intel processors. Patch by Torok Edwin.
...
llvm-svn: 61602
2009-01-03 04:04:46 +00:00
Evan Cheng
4c91aa3418
Do not isel load folding bt instructions for pentium m, core, core2, and AMD processors. These are significantly slower than a load followed by a bt of a register.
...
llvm-svn: 61557
2009-01-02 05:35:45 +00:00
Evan Cheng
13f3a33f44
Fix x86 CPU id detection to identify Penryn (and future processors).
...
llvm-svn: 61556
2009-01-02 05:29:20 +00:00
Evan Cheng
1671a309fd
Use movaps / movd to extract vector element 0 even with sse4.1. It's still cheaper than pextrw especially if the value is in memory.
...
llvm-svn: 61555
2009-01-02 05:29:08 +00:00
Duncan Sands
8feb694e8f
Fix PR3274: when promoting the condition of a BRCOND node,
...
promote from i1 all the way up to the canonical SetCC type.
In order to discover an appropriate type to use, pass
MVT::Other to getSetCCResultType. In order to be able to
do this, change getSetCCResultType to take a type as an
argument, not a value (this is also more logical).
llvm-svn: 61542
2009-01-01 15:52:00 +00:00
Bill Wendling
03f2af79b8
Linux wants the FDE initial location and address range to be forced to 32-bit.
...
Darwin doesn't. Make this optional for platforms.
llvm-svn: 61484
2008-12-29 22:12:11 +00:00
Chris Lattner
2a7c988627
Add a simple pattern for matching 'bt'.
...
llvm-svn: 61426
2008-12-25 05:34:37 +00:00
Chris Lattner
1b8c9f795a
Fix some JIT encodings.
...
llvm-svn: 61425
2008-12-25 01:32:49 +00:00
Chris Lattner
d1dfdab973
BT memory operands load from their address operand.
...
llvm-svn: 61424
2008-12-25 01:27:10 +00:00
Chris Lattner
8175f27d3f
translateX86CC can never fail. Simplify it based on this.
...
llvm-svn: 61423
2008-12-24 23:53:05 +00:00
Bill Wendling
d6bd7e9372
Darwin likes for the EH frame to be non-local.
...
llvm-svn: 61420
2008-12-24 08:05:17 +00:00
Bill Wendling
066b5f6724
GCC doesn't emit DW_EH_PE_sdata4 for the FDE encoding on Darwin. I'm not sure
...
about other platforms.
llvm-svn: 61415
2008-12-24 05:25:49 +00:00
Dan Gohman
198b8e78c3
Fix a compiler-abort on a testcase where the stack-pointer is added to
...
a symbolic constant. This is unlikely to be intentional, but it
shouldn't crash the compiler.
llvm-svn: 61408
2008-12-24 00:27:51 +00:00
Chris Lattner
4b46b74ece
indentation
...
llvm-svn: 61407
2008-12-24 00:11:37 +00:00
Chris Lattner
e9988b661d
simplify some control flow and reduce indentation, no functionality change.
...
llvm-svn: 61404
2008-12-23 23:42:27 +00:00
Dan Gohman
25a767d7f4
Add instruction patterns and encodings for the x86 bt instructions.
...
llvm-svn: 61400
2008-12-23 22:45:23 +00:00
Devang Patel
3d188347a4
Silence unused variable warnings.
...
llvm-svn: 61392
2008-12-23 21:56:28 +00:00
Dan Gohman
12f2490489
Clean up the atomic opcodes in SelectionDAG.
...
This removes all the _8, _16, _32, and _64 opcodes and replaces each
group with an unsuffixed opcode. The MemoryVT field of the AtomicSDNode
is now used to carry the size information. In tablegen, the size-specific
opcodes are replaced by size-independent opcodes that utilize the
ability to compose them with predicates.
This shrinks the per-opcode tables and makes the code that handles
atomics much more concise.
llvm-svn: 61389
2008-12-23 21:37:04 +00:00
Mon P Wang
ec95070ca3
Fixed code generation for v8i16 and v16i8 splats on X86.
...
Fixed lowering of v8i16 shuffles for v8i16 when we fall back to extract/insert.
llvm-svn: 61365
2008-12-23 04:03:27 +00:00
Dan Gohman
d72358cba8
Make the fuse-failed debug output human-readable.
...
llvm-svn: 61356
2008-12-23 00:19:20 +00:00
Dan Gohman
ab316350bf
Fix fast-isel to not emit invalid assembly when presented with a
...
constant shift count that doesn't fit in the shift instruction's
immediate field. This fixes PR3242.
llvm-svn: 61281
2008-12-20 17:19:40 +00:00
Dan Gohman
b289d4163b
Move the patterns which have i8 immediates before the patterns
...
that have i32 immediates so that they get selected first. This
currently only matters in the JIT, as assemblers will
automatically use the smallest encoding.
llvm-svn: 61250
2008-12-19 18:25:21 +00:00
Chris Lattner
9c148c8fc2
Fix some release-assert warnings
...
llvm-svn: 61244
2008-12-19 17:03:38 +00:00
Rafael Espindola
770b4b830a
Fix bug 3202.
...
The EH_frame and .eh symbols are now private, except for darwin9 and earlier.
The patch also fixes the definition of PrivateGlobalPrefix on pcc linux.
llvm-svn: 61242
2008-12-19 10:55:56 +00:00
Dan Gohman
69cd963b9a
When emitting instructions that define EFLAGS and the EFLAGS value isn't
...
used, mark the defs as dead.
llvm-svn: 61215
2008-12-18 22:03:42 +00:00
Dan Gohman
975f78ae79
When setting up the frame pointer, add it as a live-in register to all
...
non-entry blocks, so that it doesn't appear use-before-def anywhere.
llvm-svn: 61214
2008-12-18 22:01:52 +00:00
Mon P Wang
998fd29ce1
Fixed x86 code generation of multiple for v2i64. It was incorrect for SSE4.1.
...
llvm-svn: 61211
2008-12-18 21:42:19 +00:00
Dan Gohman
49c44fa014
Mark the x86 fp stack registers as "reserved". This tells LiveVariables
...
and the RegisterScavenger not to expect traditional liveness
techniques are applicable to these registers, since we don't fully
modify the effects of push and pop after stackification.
llvm-svn: 61179
2008-12-18 01:05:09 +00:00
Dan Gohman
b9a012156b
Add initial support for back-scheduling address computations,
...
especially in the case of addresses computed from loop induction
variables.
llvm-svn: 61075
2008-12-16 03:35:01 +00:00
Bill Wendling
c4499feb1a
- Use patterns instead of creating completely new instruction matching patterns,
...
which are identical to the original patterns.
- Change the multiply with overflow so that we distinguish between signed and
unsigned multiplication. Currently, unsigned multiplication with overflow
isn't working!
llvm-svn: 60963
2008-12-12 21:15:41 +00:00
Mon P Wang
9c2d26d208
Added support for SELECT v8i8 v4i16 for X86 (MMX)
...
Added support for TRUNC v8i16 to v8i8 for X86 (MMX)
llvm-svn: 60916
2008-12-12 01:25:51 +00:00
Bill Wendling
1a317678bc
Redo the arithmetic with overflow architecture. I was changing the semantics of
...
ISD::ADD to emit an implicit EFLAGS. This was horribly broken. Instead, replace
the intrinsic with an ISD::SADDO node. Then custom lower that into an
X86ISD::ADD node with a associated SETCC that checks the correct condition code
(overflow or carry). Then that gets lowered into the correct X86::ADDOvf
instruction.
Similar for SUB and MUL instructions.
llvm-svn: 60915
2008-12-12 00:56:36 +00:00
Evan Cheng
01fa50ca4f
Some code clean up.
...
llvm-svn: 60850
2008-12-10 21:49:05 +00:00
Bill Wendling
517d05fd00
Only perform SETO/SETC to JO/JC conversion if extractvalue is coming from an arithmetic with overflow instruction.
...
llvm-svn: 60844
2008-12-10 19:44:24 +00:00
Evan Cheng
0b77319742
Fix MachineCodeEmitter to use uintptr_t instead of intptr_t. This avoids some overflow issues. Patch by Thomas Jablin.
...
llvm-svn: 60828
2008-12-10 02:32:19 +00:00
Bill Wendling
f482f379ef
Whitespace changes.
...
llvm-svn: 60826
2008-12-10 02:01:32 +00:00