1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-21 03:53:04 +02:00
Commit Graph

304 Commits

Author SHA1 Message Date
Robin Morisset
c5140ae96c [X86] Erase some obsolete comments from README.txt
I just tried reproducing some of the optimization failures in README.txt in the
X86 backend, and many of them could not be reproduced. In general the entire
file appears quite bit-rotted, whatever interesting parts remain should be
moved to bugzilla, and the rest deleted. I did not spend the time to do that,
so I just deleted the few I tried reproducing which are obsolete, to save some
time to whoever will find the courage to do it.

llvm-svn: 218170
2014-09-19 23:56:46 +00:00
Manuel Jacob
a25ab845ae CodeGenPrep: sink extends of illegal types into use block.
Summary:
This helps the instruction selector to lower an i64 * i64 -> i128
multiplication into a single instruction on targets which support it.

This is an update of D2973 which was reverted because of a bug reported
as PR19084.

Reviewers: t.p.northover, chapuni

Reviewed By: t.p.northover

CC: llvm-commits, alex, chapuni

Differential Revision: http://llvm-reviews.chandlerc.com/D3021

llvm-svn: 203797
2014-03-13 13:36:25 +00:00
NAKAMURA Takumi
baf4a0d596 Revert r203230, "CodeGenPrep: sink extends of illegal types into use block."
It choked i686 stage2.

llvm-svn: 203386
2014-03-09 11:01:07 +00:00
Tim Northover
781b15d502 CodeGenPrep: sink extends of illegal types into use block.
This helps the instruction selector to lower an i64 * i64 -> i128
multiplication into a single instruction on targets which support it.

Patch by Manuel Jacob.

llvm-svn: 203230
2014-03-07 11:04:30 +00:00
Alp Toker
20f2bae8eb Fix documentation typos
llvm-svn: 197757
2013-12-20 00:33:39 +00:00
Andrey Churbanov
3ff9da9ffd Checking commit access; removed one space added in previous test checkin by Jim
llvm-svn: 189673
2013-08-30 14:40:24 +00:00
Jim Cownie
03f9812983 Checking commit access; added one space
llvm-svn: 189111
2013-08-23 15:51:37 +00:00
Paul Redmond
b0b73c2c50 Transform (x&C)>V into (x&C)!=0 where possible
When the least bit of C is greater than V, (x&C) must be greater than V
if it is not zero, so the comparison can be simplified.

Although this was suggested in Target/X86/README.txt, it benefits any
architecture with a directly testable form of AND.

Patch by Kevin Schoedel

llvm-svn: 170576
2012-12-19 19:47:13 +00:00
Benjamin Kramer
0365dc97a8 Add a note about a missed cmov -> sbb opportunity.
llvm-svn: 153741
2012-03-30 13:02:58 +00:00
Craig Topper
260a034757 Fix typo in the X86 backend readme. Patch from Jaeden Amero.
llvm-svn: 147739
2012-01-07 20:35:21 +00:00
Benjamin Kramer
facca1025b Chandler fixed this.
llvm-svn: 147247
2011-12-24 11:23:32 +00:00
Lang Hames
be4997db2f 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
c498279bec 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
bfc2dfe3f7 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
ba702bf08a Add a note about efficient codegen for binary log.
llvm-svn: 135996
2011-07-25 22:30:00 +00:00
Chris Lattner
294ec479fb add a note
llvm-svn: 131455
2011-05-17 07:22:33 +00:00
Benjamin Kramer
81d46d0c06 This is done.
llvm-svn: 130499
2011-04-29 14:09:57 +00:00
Chris Lattner
61521f8481 move PR9803 to this readme.
llvm-svn: 130385
2011-04-28 05:33:16 +00:00
Eli Friedman
50f9e90852 Remove working entry from README.
llvm-svn: 129654
2011-04-17 02:36:27 +00:00
Chris Lattner
0304b82f80 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
0f6423cf23 move PR9661 out to here.
llvm-svn: 129527
2011-04-14 18:47:18 +00:00
Rafael Espindola
2d898c22cd Add another case we are not optimizing.
llvm-svn: 129012
2011-04-06 17:35:32 +00:00
Rafael Espindola
115cbc12ea 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
dcc256df41 A couple new README entries.
llvm-svn: 127786
2011-03-17 01:22:09 +00:00
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