Commit Graph

267 Commits

Author SHA1 Message Date
Dan Gohman
24bde5bce1 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112861 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-02 21:18:42 +00:00
Eli Friedman
5033f64694 A couple of small missed optimizations.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112411 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-29 05:07:40 +00:00
Eric Christopher
9a9d275dc7 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109078 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-22 02:48:34 +00:00
Eli Friedman
2ad7e433c9 Remove a fixed item, update a couple partially-fixed items.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@105375 91177308-0d34-0410-b5e6-96231b3b80d8
2010-06-03 01:01:48 +00:00
Dan Gohman
85e9601862 This is now done.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97450 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-01 17:43:57 +00:00
Eli Friedman
11d91e80b4 A few missed optimizations; the last one could have a significant impact on
code with lots of bitfields.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95809 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-10 21:26:04 +00:00
Chris Lattner
5350f78323 this is an SSE-specific issue.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93373 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-13 23:29:11 +00:00
Chris Lattner
689339c50f X86 if conversion + tail merging issues from PR6032.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93372 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-13 23:28:40 +00:00
Dan Gohman
3c02c22ef9 Remove some README.txt entries which are now implemented.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92511 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-04 20:55:05 +00:00
Eli Friedman
1f1b0f748d A couple minor README updates.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91823 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-21 08:03:16 +00:00
Bill Wendling
5a56927345 Move and clarify note.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85334 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-27 22:48:31 +00:00
Bill Wendling
de020736c0 Note corrected.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85332 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-27 22:43:24 +00:00
Bill Wendling
d8499c9b7f Modify note.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85331 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-27 22:40:45 +00:00
Bill Wendling
1ff2c485e2 Add a note.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85329 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-27 22:34:43 +00:00
Evan Cheng
7216920791 Add a note.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77584 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-30 08:56:19 +00:00
Chris Lattner
e3821c79bc remove a bogus note.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74509 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-30 05:22:31 +00:00
Chris Lattner
a05ec61684 add a note
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74508 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-30 04:20:46 +00:00
Chris Lattner
b42e20be77 another xform that is target-independent (should be done in instcombine).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73472 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-16 06:15:56 +00:00
Chris Lattner
d23fffeb16 I think instcombine should unconditionally do this xform.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73471 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-16 06:11:35 +00:00
Eli Friedman
7161cb1dad Misc x86 README updates: remove a couple of already-fixed issues,
add a few suggestions from looking at some assembly code.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73210 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-11 23:07:04 +00:00
Chris Lattner
d9b77159d6 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72396 91177308-0d34-0410-b5e6-96231b3b80d8
2009-05-25 20:28:19 +00:00
Chris Lattner
f9dc644936 we should eventually add -march=atom and the new atom movbe instruction.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72387 91177308-0d34-0410-b5e6-96231b3b80d8
2009-05-25 16:34:44 +00:00
Chris Lattner
d1980a5acd 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.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@66779 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-12 06:52:53 +00:00
Dan Gohman
3328adda6b Add more information to the EFLAGS note.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@66515 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-10 00:26:23 +00:00
Dan Gohman
ad93e1e5fc Add a note about EFLAGS optimization.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@66508 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-09 23:47:02 +00:00
Chris Lattner
ff9dcee534 add a note.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@66360 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-08 03:04:26 +00:00
Chris Lattner
b34487dcba add a note.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@66359 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-08 01:54:43 +00:00
Chris Lattner
a66878b881 add a horrible note
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@64719 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-17 01:16:14 +00:00
Dan Gohman
35188eb54d MachineLICM now handles these cases.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@64620 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-15 23:24:52 +00:00
Chris Lattner
be685cc72a add a note.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@64093 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-08 20:44:19 +00:00
Chris Lattner
f96ca79cf3 add a note
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60632 91177308-0d34-0410-b5e6-96231b3b80d8
2008-12-06 22:49:05 +00:00
Eli Friedman
91db5271d2 A couple small cleanups, plus a new potential optimization.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60286 91177308-0d34-0410-b5e6-96231b3b80d8
2008-11-30 07:52:27 +00:00
Evan Cheng
86d77337fc Add a README entry.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@59052 91177308-0d34-0410-b5e6-96231b3b80d8
2008-11-11 17:35:52 +00:00
Torok Edwin
61df3b751a move the note to the correct README
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58104 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-24 19:23:07 +00:00
Dan Gohman
97b38270cf This is done.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57733 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-17 21:38:40 +00:00
Evan Cheng
b09c25ebf0 This is done.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55348 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-26 01:13:44 +00:00
Nate Begeman
29681a5385 Remove unnecessary readme entry
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53722 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-17 17:21:14 +00:00
Dan Gohman
2d0d59380a Add a note about a potential PIC optimization.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52663 91177308-0d34-0410-b5e6-96231b3b80d8
2008-06-24 00:53:07 +00:00
Chris Lattner
88c1baa50c add a micro optzn.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50681 91177308-0d34-0410-b5e6-96231b3b80d8
2008-05-05 23:19:45 +00:00
Chris Lattner
7d717a0b70 Add an ugly note.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50029 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-21 04:46:30 +00:00
Evan Cheng
ddf0a06580 New entry.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48912 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-28 07:07:06 +00:00
Evan Cheng
3d5cd6118d Remove duplicated entries.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48714 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-23 22:56:07 +00:00
Christopher Lamb
15cbde3cf6 Fix X86's isTruncateFree to not claim that truncate to i1 is free. This fixes Bill's testcase that failed for r48491.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48542 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-19 08:30:06 +00:00
Chris Lattner
69a74ab421 Add an issue that is preventing instcombine from doing a simplification.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48356 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-14 06:00:19 +00:00
Chris Lattner
f658ad10f6 move these to the appropriate file
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48054 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-08 22:28:45 +00:00
Gabor Greif
2cf36e0772 some more spelling changes
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47996 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-06 10:51:21 +00:00
Chris Lattner
767486b1d5 Evan implemented these.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47828 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-02 18:05:14 +00:00
Chris Lattner
daf6c541b2 Add a random not very important note
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47704 91177308-0d34-0410-b5e6-96231b3b80d8
2008-02-28 04:52:59 +00:00
Eli Friedman
41ce5b82da A few more small things I've run into.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47702 91177308-0d34-0410-b5e6-96231b3b80d8
2008-02-28 00:21:43 +00:00
Evan Cheng
fd1074f171 This is done.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47688 91177308-0d34-0410-b5e6-96231b3b80d8
2008-02-27 20:26:32 +00:00