Benjamin Kramer
88d31b3f0c
Add a note about a missed cmov -> sbb opportunity.
...
llvm-svn: 153741
2012-03-30 13:02:58 +00:00
Craig Topper
f210619d08
Fix typo in the X86 backend readme. Patch from Jaeden Amero.
...
llvm-svn: 147739
2012-01-07 20:35:21 +00:00
Benjamin Kramer
767bbe48c1
Chandler fixed this.
...
llvm-svn: 147247
2011-12-24 11:23:32 +00:00
Lang Hames
de7ab801cc
Add a natural stack alignment field to TargetData, and prevent InstCombine from
...
promoting allocas to preferred alignments that exceed the natural
alignment. This avoids some potentially expensive dynamic stack realignments.
The natural stack alignment is set in target data strings via the "S<size>"
option. Size is in bits and must be a multiple of 8. The natural stack alignment
defaults to "unspecified" (represented by a zero value), and the "unspecified"
value does not prevent any alignment promotions. Target maintainers that care
about avoiding promotions should explicitly add the "S<size>" option to their
target data strings.
llvm-svn: 141599
2011-10-10 23:42:08 +00:00
Benjamin Kramer
42c0330a79
X86: Add patterns for the movbe instruction (mov + bswap, only available on atom)
...
llvm-svn: 141563
2011-10-10 18:34:56 +00:00
Benjamin Kramer
124ac2b997
Add a neat little two's complement hack for x86.
...
On x86 we can't encode an immediate LHS of a sub directly. If the RHS comes from a XOR with a constant we can
fold the negation into the xor and add one to the immediate of the sub. Then we can turn the sub into an add,
which can be commuted and encoded efficiently.
This code is generated for __builtin_clz and friends.
llvm-svn: 136167
2011-07-26 22:42:13 +00:00
Benjamin Kramer
c956033947
Add a note about efficient codegen for binary log.
...
llvm-svn: 135996
2011-07-25 22:30:00 +00:00
Chris Lattner
1e81f57bf0
add a note
...
llvm-svn: 131455
2011-05-17 07:22:33 +00:00
Benjamin Kramer
6708499b6d
This is done.
...
llvm-svn: 130499
2011-04-29 14:09:57 +00:00
Chris Lattner
2a75c72e1c
move PR9803 to this readme.
...
llvm-svn: 130385
2011-04-28 05:33:16 +00:00
Eli Friedman
55f7bf3289
Remove working entry from README.
...
llvm-svn: 129654
2011-04-17 02:36:27 +00:00
Chris Lattner
0ab5e2cded
Fix a ton of comment typos found by codespell. Patch by
...
Luis Felipe Strano Moraes!
llvm-svn: 129558
2011-04-15 05:18:47 +00:00
Chris Lattner
6f195469b1
move PR9661 out to here.
...
llvm-svn: 129527
2011-04-14 18:47:18 +00:00
Rafael Espindola
b4dd95b4f9
Add another case we are not optimizing.
...
llvm-svn: 129012
2011-04-06 17:35:32 +00:00
Rafael Espindola
7a3b244d45
The original issue has been fixed by not doing unnecessary sign extensions.
...
Change the test to force a sign extension and expose the problem again.
llvm-svn: 129011
2011-04-06 17:19:35 +00:00
Eli Friedman
e8f2be0c10
A couple new README entries.
...
llvm-svn: 127786
2011-03-17 01:22:09 +00:00
Chris Lattner
5237febf0c
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
39314bdbc8
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
8731d0cc83
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
78b9851a3a
Minor x86 README updates.
...
llvm-svn: 126054
2011-02-19 21:54:28 +00:00
Chris Lattner
0281731cc2
add a poor division by constant case.
...
llvm-svn: 125832
2011-02-18 05:35:49 +00:00
Chris Lattner
51415d26f1
update a bunch of entries.
...
llvm-svn: 122700
2011-01-02 18:31:38 +00:00
Chris Lattner
f9e0a56b94
fix some sort of weird pasto
...
llvm-svn: 122560
2010-12-26 12:05:11 +00:00
Chris Lattner
424de3498b
add a note
...
llvm-svn: 122559
2010-12-26 03:53:31 +00:00
Benjamin Kramer
b37ae33125
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
6020ed9d99
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
c8b035d006
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
d4b0873c06
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
5d2262dc76
apparently tailcalls are better on darwin/x86-64 than on linux?
...
llvm-svn: 119947
2010-11-21 18:59:20 +00:00
Dan Gohman
3c9b5f394b
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
f75de6eae7
A couple of small missed optimizations.
...
llvm-svn: 112411
2010-08-29 05:07:40 +00:00
Eric Christopher
9a77382685
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
1f41303260
Remove a fixed item, update a couple partially-fixed items.
...
llvm-svn: 105375
2010-06-03 01:01:48 +00:00
Dan Gohman
312d604ee2
This is now done.
...
llvm-svn: 97450
2010-03-01 17:43:57 +00:00
Eli Friedman
4d4c6944e9
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
3eb76c23dd
this is an SSE-specific issue.
...
llvm-svn: 93373
2010-01-13 23:29:11 +00:00
Chris Lattner
fb534d97b5
X86 if conversion + tail merging issues from PR6032.
...
llvm-svn: 93372
2010-01-13 23:28:40 +00:00
Dan Gohman
5d1987f9a0
Remove some README.txt entries which are now implemented.
...
llvm-svn: 92511
2010-01-04 20:55:05 +00:00
Eli Friedman
dbe2aa91b9
A couple minor README updates.
...
llvm-svn: 91823
2009-12-21 08:03:16 +00:00
Bill Wendling
fd2730ee8c
Move and clarify note.
...
llvm-svn: 85334
2009-10-27 22:48:31 +00:00
Bill Wendling
2974f63cb5
Note corrected.
...
llvm-svn: 85332
2009-10-27 22:43:24 +00:00
Bill Wendling
cd4d148040
Modify note.
...
llvm-svn: 85331
2009-10-27 22:40:45 +00:00
Bill Wendling
a205402c16
Add a note.
...
llvm-svn: 85329
2009-10-27 22:34:43 +00:00
Evan Cheng
92df9c3323
Add a note.
...
llvm-svn: 77584
2009-07-30 08:56:19 +00:00
Chris Lattner
b127c0684f
remove a bogus note.
...
llvm-svn: 74509
2009-06-30 05:22:31 +00:00
Chris Lattner
5ed255e642
add a note
...
llvm-svn: 74508
2009-06-30 04:20:46 +00:00
Chris Lattner
0101f45785
another xform that is target-independent (should be done in instcombine).
...
llvm-svn: 73472
2009-06-16 06:15:56 +00:00
Chris Lattner
aba55a69b1
I think instcombine should unconditionally do this xform.
...
llvm-svn: 73471
2009-06-16 06:11:35 +00:00
Eli Friedman
32ad5e9c08
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
9b65031add
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