Chris Lattner
e7dc7e1e5b
a serious "compare CSE" issue that is nontrivial to get right,
...
but which is responsible for us doing really bad things to 256.bzip2.
llvm-svn: 126126
2011-02-21 17:03:47 +00:00
Cameron Zwarich
3384d8f317
A lo/hi mul has higher latency than an imul r,ri, e.g. 5 cycles compared to 3
...
on Core 2 and Nehalem, so the code we generate is better than GCC's here.
llvm-svn: 126100
2011-02-21 01:29:32 +00:00
Cameron Zwarich
b7e676db6c
The signed version of our "magic number" computation for the integer approximation
...
of a constant had a minor typo introduced when copying it from the book, which
caused it to favor negative approximations over positive approximations in many
cases. Positive approximations require fewer operations beyond the multiplication.
In the case of division by 3, we still generate code that is a single instruction
larger than GCC's code.
llvm-svn: 126097
2011-02-21 00:22:02 +00:00
Eli Friedman
0ad25251cb
Minor x86 README updates.
...
llvm-svn: 126054
2011-02-19 21:54:28 +00:00
Chris Lattner
2aebf9f4ad
add a poor division by constant case.
...
llvm-svn: 125832
2011-02-18 05:35:49 +00:00
Chris Lattner
222b24e2de
update a bunch of entries.
...
llvm-svn: 122700
2011-01-02 18:31:38 +00:00
Chris Lattner
a6f2b8316f
fix some sort of weird pasto
...
llvm-svn: 122560
2010-12-26 12:05:11 +00:00
Chris Lattner
eec079a470
add a note
...
llvm-svn: 122559
2010-12-26 03:53:31 +00:00
Benjamin Kramer
b21118c91b
Remove some obsolete README items, add a new one off the top of my head.
...
llvm-svn: 122495
2010-12-23 15:07:02 +00:00
Benjamin Kramer
d8387aa9bd
X86: Lower a select directly to a setcc_carry if possible.
...
int test(unsigned long a, unsigned long b) { return -(a < b); }
compiles to
_test: ## @test
cmpq %rsi, %rdi ## encoding: [0x48,0x39,0xf7]
sbbl %eax, %eax ## encoding: [0x19,0xc0]
ret ## encoding: [0xc3]
instead of
_test: ## @test
xorl %ecx, %ecx ## encoding: [0x31,0xc9]
cmpq %rsi, %rdi ## encoding: [0x48,0x39,0xf7]
movl $-1, %eax ## encoding: [0xb8,0xff,0xff,0xff,0xff]
cmovael %ecx, %eax ## encoding: [0x0f,0x43,0xc1]
ret ## encoding: [0xc3]
llvm-svn: 122451
2010-12-22 23:09:28 +00:00
Benjamin Kramer
5a1721f4ac
Factor the (x & 2^n) ? 2^m : 0 instcombine into its own method and generalize it
...
to catch cases where n != m with a shift.
llvm-svn: 121608
2010-12-11 09:42:59 +00:00
Evan Cheng
f7e586d749
Enable sibling call optimization of libcalls which are expanded during
...
legalization time. Since at legalization time there is no mapping from
SDNode back to the corresponding LLVM instruction and the return
SDNode is target specific, this requires a target hook to check for
eligibility. Only x86 and ARM support this form of sibcall optimization
right now.
rdar://8707777
llvm-svn: 120501
2010-11-30 23:55:39 +00:00
Chris Lattner
dd03f96698
apparently tailcalls are better on darwin/x86-64 than on linux?
...
llvm-svn: 119947
2010-11-21 18:59:20 +00:00
Dan Gohman
6824bfc554
Don't narrow the load and store in a load+twiddle+store sequence unless
...
there are clearly no stores between the load and the store. This fixes
this miscompile reported as PR7833.
This breaks the test/CodeGen/X86/narrow_op-2.ll optimization, which is
safe, but awkward to prove safe. Move it to X86's README.txt.
llvm-svn: 112861
2010-09-02 21:18:42 +00:00
Eli Friedman
6ccafafe61
A couple of small missed optimizations.
...
llvm-svn: 112411
2010-08-29 05:07:40 +00:00
Eric Christopher
4924d5fb93
Custom lower the memory barrier instructions and add support
...
for lowering without sse2. Add a couple of new testcases.
Fixes a few libgomp tests and latent bugs. Remove a few todos.
llvm-svn: 109078
2010-07-22 02:48:34 +00:00
Eli Friedman
fbfaab45a3
Remove a fixed item, update a couple partially-fixed items.
...
llvm-svn: 105375
2010-06-03 01:01:48 +00:00
Dan Gohman
0d46f3e9e6
This is now done.
...
llvm-svn: 97450
2010-03-01 17:43:57 +00:00
Eli Friedman
63e676c905
A few missed optimizations; the last one could have a significant impact on
...
code with lots of bitfields.
llvm-svn: 95809
2010-02-10 21:26:04 +00:00
Chris Lattner
72a06499b3
this is an SSE-specific issue.
...
llvm-svn: 93373
2010-01-13 23:29:11 +00:00
Chris Lattner
0aa093dbdf
X86 if conversion + tail merging issues from PR6032.
...
llvm-svn: 93372
2010-01-13 23:28:40 +00:00
Dan Gohman
f5f090c2c5
Remove some README.txt entries which are now implemented.
...
llvm-svn: 92511
2010-01-04 20:55:05 +00:00
Eli Friedman
50c8e9154f
A couple minor README updates.
...
llvm-svn: 91823
2009-12-21 08:03:16 +00:00
Bill Wendling
cb9a2f20d5
Move and clarify note.
...
llvm-svn: 85334
2009-10-27 22:48:31 +00:00
Bill Wendling
2aaf2ae6e1
Note corrected.
...
llvm-svn: 85332
2009-10-27 22:43:24 +00:00
Bill Wendling
3e4dd02a1e
Modify note.
...
llvm-svn: 85331
2009-10-27 22:40:45 +00:00
Bill Wendling
3edf1d3854
Add a note.
...
llvm-svn: 85329
2009-10-27 22:34:43 +00:00
Evan Cheng
20a1862b23
Add a note.
...
llvm-svn: 77584
2009-07-30 08:56:19 +00:00
Chris Lattner
7d0212b87d
remove a bogus note.
...
llvm-svn: 74509
2009-06-30 05:22:31 +00:00
Chris Lattner
903e3854e0
add a note
...
llvm-svn: 74508
2009-06-30 04:20:46 +00:00
Chris Lattner
001e9a5857
another xform that is target-independent (should be done in instcombine).
...
llvm-svn: 73472
2009-06-16 06:15:56 +00:00
Chris Lattner
b38b0eb4e0
I think instcombine should unconditionally do this xform.
...
llvm-svn: 73471
2009-06-16 06:11:35 +00:00
Eli Friedman
74e9f6c070
Misc x86 README updates: remove a couple of already-fixed issues,
...
add a few suggestions from looking at some assembly code.
llvm-svn: 73210
2009-06-11 23:07:04 +00:00
Chris Lattner
636bd70540
add some late optimizations that GCC does. It thinks these are a win
...
even on Core2, not just AMD processors which was a surprise to me.
llvm-svn: 72396
2009-05-25 20:28:19 +00:00
Chris Lattner
60098b3e93
we should eventually add -march=atom and the new atom movbe instruction.
...
llvm-svn: 72387
2009-05-25 16:34:44 +00:00
Chris Lattner
26a971c4ec
Move 3 "(add (select cc, 0, c), x) -> (select cc, x, (add, x, c))"
...
related transformations out of target-specific dag combine into the
ARM backend. These were added by Evan in r37685 with no testcases
and only seems to help ARM (e.g. test/CodeGen/ARM/select_xform.ll).
Add some simple X86-specific (for now) DAG combines that turn things
like cond ? 8 : 0 -> (zext(cond) << 3). This happens frequently
with the recently added cp constant select optimization, but is a
very general xform. For example, we now compile the second example
in const-select.ll to:
_test:
movsd LCPI2_0, %xmm0
ucomisd 8(%esp), %xmm0
seta %al
movzbl %al, %eax
movl 4(%esp), %ecx
movsbl (%ecx,%eax,4), %eax
ret
instead of:
_test:
movl 4(%esp), %eax
leal 4(%eax), %ecx
movsd LCPI2_0, %xmm0
ucomisd 8(%esp), %xmm0
cmovbe %eax, %ecx
movsbl (%ecx), %eax
ret
This passes multisource and dejagnu.
llvm-svn: 66779
2009-03-12 06:52:53 +00:00
Dan Gohman
e15d8f03c3
Add more information to the EFLAGS note.
...
llvm-svn: 66515
2009-03-10 00:26:23 +00:00
Dan Gohman
995c3dd344
Add a note about EFLAGS optimization.
...
llvm-svn: 66508
2009-03-09 23:47:02 +00:00
Chris Lattner
3342ba06d4
add a note.
...
llvm-svn: 66360
2009-03-08 03:04:26 +00:00
Chris Lattner
8ace06fdda
add a note.
...
llvm-svn: 66359
2009-03-08 01:54:43 +00:00
Chris Lattner
3b67310686
add a horrible note
...
llvm-svn: 64719
2009-02-17 01:16:14 +00:00
Dan Gohman
856736a187
MachineLICM now handles these cases.
...
llvm-svn: 64620
2009-02-15 23:24:52 +00:00
Chris Lattner
a50a554333
add a note.
...
llvm-svn: 64093
2009-02-08 20:44:19 +00:00
Chris Lattner
00104cf8f8
add a note
...
llvm-svn: 60632
2008-12-06 22:49:05 +00:00
Eli Friedman
3b8efd50d7
A couple small cleanups, plus a new potential optimization.
...
llvm-svn: 60286
2008-11-30 07:52:27 +00:00
Evan Cheng
82b17df2b0
Add a README entry.
...
llvm-svn: 59052
2008-11-11 17:35:52 +00:00
Torok Edwin
e0ecce06a0
move the note to the correct README
...
llvm-svn: 58104
2008-10-24 19:23:07 +00:00
Dan Gohman
69ac9cc00f
This is done.
...
llvm-svn: 57733
2008-10-17 21:38:40 +00:00
Evan Cheng
65d29b2553
This is done.
...
llvm-svn: 55348
2008-08-26 01:13:44 +00:00
Nate Begeman
64f8f7f6bb
Remove unnecessary readme entry
...
llvm-svn: 53722
2008-07-17 17:21:14 +00:00