Benjamin Kramer
2b76c66fd6
Add constant folding for strspn and strcspn to SimplifyLibCalls.
...
llvm-svn: 115116
2010-09-30 00:58:35 +00:00
Chris Lattner
011f146419
idiom recognition should catch this.
...
llvm-svn: 114304
2010-09-19 00:37:34 +00:00
Nick Lewycky
bb10e90487
Add optimization to Target/README.txt.
...
llvm-svn: 110543
2010-08-08 07:04:25 +00:00
Benjamin Kramer
2321e6a4d4
Teach instcombine to transform
...
(X >s -1) ? C1 : C2 and (X <s 0) ? C2 : C1
into ((X >>s 31) & (C2 - C1)) + C1, avoiding the conditional.
This optimization could be extended to take non-const C1 and C2 but we better
stay conservative to avoid code size bloat for now.
for
int sel(int n) {
return n >= 0 ? 60 : 100;
}
we now generate
sarl $31, %edi
andl $40, %edi
leal 60(%rdi), %eax
instead of
testl %edi, %edi
movl $60, %ecx
movl $100, %eax
cmovnsl %ecx, %eax
llvm-svn: 107866
2010-07-08 11:39:10 +00:00
Eli Friedman
c8f595212f
Minor amendment to switch-lowering improvement.
...
llvm-svn: 107569
2010-07-03 08:43:32 +00:00
Eli Friedman
836fdbc85b
Note switch-lowering inefficiency.
...
llvm-svn: 107565
2010-07-03 07:38:12 +00:00
Eric Christopher
e34471bb31
Add another bswap idiom that isn't matched.
...
llvm-svn: 107213
2010-06-29 22:22:22 +00:00
Benjamin Kramer
41476410c9
TODO--
...
llvm-svn: 106102
2010-06-16 15:47:00 +00:00
Eli Friedman
e17e4aea2a
Add README entry; based on testcase from Bill Hart.
...
llvm-svn: 105878
2010-06-12 05:54:27 +00:00
Chris Lattner
4dc833c607
add a note
...
llvm-svn: 104404
2010-05-21 23:16:21 +00:00
Dan Gohman
73c8145505
Add a README entry.
...
llvm-svn: 102906
2010-05-03 14:31:00 +00:00
Chris Lattner
cfc921cd2a
add a note
...
llvm-svn: 101581
2010-04-16 23:52:30 +00:00
Chris Lattner
4041ab6e00
Implement rdar://7860110 (also in target/readme.txt) narrowing
...
a load/or/and/store sequence into a narrower store when it is
safe. Daniel tells me that clang will start producing this sort
of thing with bitfields, and this does trigger a few dozen times
on 176.gcc produced by llvm-gcc even now.
This compiles code like CodeGen/X86/2009-05-28-DAGCombineCrash.ll
into:
movl %eax, 36(%rdi)
instead of:
movl $4294967295, %eax ## imm = 0xFFFFFFFF
andq 32(%rdi), %rax
shlq $32, %rcx
addq %rax, %rcx
movq %rcx, 32(%rdi)
and each of the testcases into a single store. Each of them used
to compile into craziness like this:
_test4:
movl $65535, %eax ## imm = 0xFFFF
andl (%rdi), %eax
shll $16, %esi
addl %eax, %esi
movl %esi, (%rdi)
ret
llvm-svn: 101343
2010-04-15 04:48:01 +00:00
Chris Lattner
1f6689a8ba
move PR6576 here.
...
llvm-svn: 98194
2010-03-10 21:42:42 +00:00
Chris Lattner
187242b3ab
move PR6212 to this file.
...
llvm-svn: 95624
2010-02-09 00:11:10 +00:00
Eli Friedman
0de0b3677a
Remove a completed item, add a couple new ones.
...
llvm-svn: 94945
2010-01-31 04:55:32 +00:00
Bob Wilson
7c42b9d51e
Improve isSafeToLoadUnconditionally to recognize that GEPs with constant
...
indices are safe if the result is known to be within the bounds of the
underlying object.
llvm-svn: 94829
2010-01-29 19:19:08 +00:00
Chris Lattner
e3a68d1063
reassociate should do this.
...
llvm-svn: 94374
2010-01-24 20:17:09 +00:00
Chris Lattner
7e3f8b60d6
add a note.
...
llvm-svn: 94373
2010-01-24 20:01:41 +00:00
Chris Lattner
249da5cb73
implement a simple instcombine xform that has been in the
...
readme forever.
llvm-svn: 94318
2010-01-23 18:49:30 +00:00
Chris Lattner
082da53f9a
add some notes, making posix-memalign be nocapture would be an easy improvement.
...
llvm-svn: 94312
2010-01-23 17:59:23 +00:00
Eli Friedman
9ed49c5c8f
Add some potentially interesting transformations to README.
...
llvm-svn: 93797
2010-01-18 22:36:59 +00:00
Duncan Sands
c8493da5b1
Fix a README item: have functionattrs look through selects and
...
phi nodes when deciding which pointers point to local memory.
I actually checked long ago how useful this is, and it isn't
very: it hardly ever fires in the testsuite, but since Chris
wants it here it is!
llvm-svn: 92836
2010-01-06 15:37:47 +00:00
Duncan Sands
78376ad7e1
Partially address a README by having functionattrs consider calls to
...
memcpy, memset and other intrinsics that only access their arguments
to be readnone if the intrinsic's arguments all point to local memory.
This improves the testcase in the README to readonly, but it could in
theory be made readnone, however this would involve more sophisticated
analysis that looks through the memcpy.
llvm-svn: 92829
2010-01-06 08:45:52 +00:00
Chris Lattner
2d91231d82
implement an instcombine xform needed by clang's codegen
...
on the example in PR4216. This doesn't trigger in the testsuite,
so I'd really appreciate someone scrutinizing the logic for
correctness.
llvm-svn: 92458
2010-01-04 06:03:59 +00:00
Chris Lattner
39f18e545e
Teach codegen to lower llvm.powi to an efficient (but not optimal)
...
multiply sequence when the power is a constant integer. Before, our
codegen for std::pow(.., int) always turned into a libcall, which was
really inefficient.
This should also make many gfortran programs happier I'd imagine.
llvm-svn: 92388
2010-01-01 03:32:16 +00:00
Chris Lattner
71cf7c256f
update this. To take the next step, llvm.powi should be generalized to work
...
on integers as well and codegen should lower them to branch trees.
llvm-svn: 92382
2010-01-01 01:29:26 +00:00
Eli Friedman
96cf7f42b0
More info on this transformation.
...
llvm-svn: 91230
2009-12-12 23:23:43 +00:00
Eli Friedman
8eada9f580
Remove some stuff that's already implemented. Also, remove the note about
...
merging x >u 5 and x <s 20 because it's impossible to implement.
llvm-svn: 91228
2009-12-12 21:41:48 +00:00
Chris Lattner
f05330a5c8
expand note.
...
llvm-svn: 90429
2009-12-03 07:43:46 +00:00
Chris Lattner
d1e4ee3c2b
add a note
...
llvm-svn: 90428
2009-12-03 07:41:54 +00:00
Chris Lattner
58ccf88c36
update and consolidate the load pre notes.
...
llvm-svn: 90050
2009-11-29 02:19:52 +00:00
Chris Lattner
83a4a9868f
add a deadargelim note.
...
llvm-svn: 90009
2009-11-27 17:12:30 +00:00
Chris Lattner
ca9e0e83b3
This testcase is actually only partially redundant, and requires
...
the FIXME I added yesterday to be implemented.
llvm-svn: 90008
2009-11-27 16:53:57 +00:00
Chris Lattner
cc6d29286c
this (and probably several others) are now done.
...
llvm-svn: 89982
2009-11-27 00:35:04 +00:00
Chris Lattner
9bd2136ca3
Teach memdep to phi translate bitcasts. This allows us to compile
...
the example in GCC PR16799 to:
LBB1_2: ## %bb1
movl %eax, %eax
subq %rax, %rdi
movq %rdi, (%rcx)
movl (%rdi), %eax
testl %eax, %eax
je LBB1_2
instead of:
LBB1_2: ## %bb1
movl (%rdi), %ecx
subq %rcx, %rdi
movq %rdi, (%rax)
cmpl $0, (%rdi)
je LBB1_2
llvm-svn: 89978
2009-11-26 23:41:07 +00:00
Chris Lattner
29bc8a91d3
Teach basicaa that x|c == x+c when the c bits of x are clear. This
...
allows us to compile the example in readme.txt into:
LBB1_1: ## %bb
movl 4(%rdx,%rax), %ecx
movl %ecx, %esi
imull (%rdx,%rax), %esi
imull %esi, %ecx
movl %esi, 8(%rdx,%rax)
imull %ecx, %esi
movl %ecx, 12(%rdx,%rax)
movl %esi, 16(%rdx,%rax)
imull %ecx, %esi
movl %esi, 20(%rdx,%rax)
addq $16, %rax
cmpq $4000, %rax
jne LBB1_1
instead of:
LBB1_1:
movl (%rdx,%rax), %ecx
imull 4(%rdx,%rax), %ecx
movl %ecx, 8(%rdx,%rax)
imull 4(%rdx,%rax), %ecx
movl %ecx, 12(%rdx,%rax)
imull 8(%rdx,%rax), %ecx
movl %ecx, 16(%rdx,%rax)
imull 12(%rdx,%rax), %ecx
movl %ecx, 20(%rdx,%rax)
addq $16, %rax
cmpq $4000, %rax
jne LBB1_1
GCC (4.2) doesn't seem to be able to eliminate the loads in this
testcase either, it generates:
L2:
movl (%rdx), %eax
imull 4(%rdx), %eax
movl %eax, 8(%rdx)
imull 4(%rdx), %eax
movl %eax, 12(%rdx)
imull 8(%rdx), %eax
movl %eax, 16(%rdx)
imull 12(%rdx), %eax
movl %eax, 20(%rdx)
addl $4, %ecx
addq $16, %rdx
cmpl $1002, %ecx
jne L2
llvm-svn: 89952
2009-11-26 16:26:43 +00:00
Chris Lattner
12dacdd359
teach basicaa that A[i] != A[i+1].
...
llvm-svn: 89951
2009-11-26 16:18:10 +00:00
Chris Lattner
8e09ad6f3c
update some notes slightly
...
llvm-svn: 89913
2009-11-26 01:51:18 +00:00
Nick Lewycky
ef4ea9a2a9
Add a complex missed optimization opportunity I came across while investigating
...
bug 5438.
llvm-svn: 88855
2009-11-15 17:51:23 +00:00
Chris Lattner
7a09964e81
another const prop failure.
...
llvm-svn: 86848
2009-11-11 17:54:02 +00:00
Chris Lattner
539bdf0487
add a note
...
llvm-svn: 86847
2009-11-11 17:51:27 +00:00
Chris Lattner
0169fd7c62
add a note
...
llvm-svn: 86756
2009-11-10 23:47:45 +00:00
Chris Lattner
8ff26038ef
I did this a week or two ago
...
llvm-svn: 86754
2009-11-10 23:40:49 +00:00
Nick Lewycky
b9397262b7
Improve tail call elimination to handle the switch statement.
...
llvm-svn: 86403
2009-11-07 21:10:15 +00:00
Chris Lattner
06c26d982e
add a note from PR5313
...
llvm-svn: 86146
2009-11-05 18:19:19 +00:00
Bill Wendling
2e5198ff09
Add new note.
...
llvm-svn: 85341
2009-10-27 23:30:07 +00:00
Bill Wendling
fd2730ee8c
Move and clarify note.
...
llvm-svn: 85334
2009-10-27 22:48:31 +00:00
Chris Lattner
13b8b56dd4
this is done.
...
llvm-svn: 85041
2009-10-25 06:17:51 +00:00
Chris Lattner
851193b873
some stuff is done, we still have constantexpr simplification to do.
...
llvm-svn: 84943
2009-10-23 07:00:55 +00:00
Chris Lattner
bc69313909
IPSCCP is missing stuff.
...
llvm-svn: 84725
2009-10-21 01:10:37 +00:00
Chris Lattner
61858787b1
add a note
...
llvm-svn: 82442
2009-09-21 06:04:07 +00:00
Chris Lattner
9858859fd6
one case handled, expanded another testcase inline.
...
llvm-svn: 82427
2009-09-21 02:53:57 +00:00
Chris Lattner
fc2d846dc8
update an entry, delete an entry which has been fixed.
...
llvm-svn: 82398
2009-09-20 17:37:38 +00:00
Nick Lewycky
9b3ed87506
Peer through zext and sext to eliminate them when it is safe to do so.
...
llvm-svn: 82389
2009-09-20 07:31:25 +00:00
Chris Lattner
dda095ec4a
add PR#
...
llvm-svn: 81770
2009-09-14 16:49:26 +00:00
Dan Gohman
4ac2f639cd
Transform -X/C to X/-C, implementing a README.txt entry.
...
llvm-svn: 78812
2009-08-12 16:37:02 +00:00
Eli Friedman
1e08ca7313
Remove a couple of already-implemented notes.
...
llvm-svn: 76631
2009-07-21 20:05:43 +00:00
Nick Lewycky
4e705e421c
Move PR4517 to README.txt.
...
llvm-svn: 75098
2009-07-09 04:03:30 +00:00
Dan Gohman
d76d71a291
Factor the code for collecting IV users out of LSR into an IVUsers class,
...
and generalize it so that it can be used by IndVarSimplify. Implement the
base IndVarSimplify transformation code using IVUsers. This removes
TestOrigIVForWrap and associated code, as ScalarEvolution now has enough
builtin overflow detection and folding logic to handle all the same cases,
and more. Run "opt -iv-users -analyze -disable-output" on your favorite
loop for an example of what IVUsers does.
This lets IndVarSimplify eliminate IV casts and compute trip counts in
more cases. Also, this happens to finally fix the remaining testcases
in PR1301.
Now that IndVarSimplify is being more aggressive, it occasionally runs
into the problem where ScalarEvolutionExpander's code for avoiding
duplicate expansions makes it difficult to ensure that all expanded
instructions dominate all the instructions that will use them. As a
temporary measure, IndVarSimplify now uses a FixUsesBeforeDefs function
to fix up instructions inserted by SCEVExpander. Fortunately, this code
is contained, and can be easily removed once a more comprehensive
solution is available.
llvm-svn: 71535
2009-05-12 02:17:14 +00:00
Dan Gohman
1dbb40f481
Fix two wording errors that Duncan spotted.
...
llvm-svn: 71459
2009-05-11 18:51:16 +00:00
Dan Gohman
b0ddbbe7c4
LLVM has unaligned loads and stores now.
...
llvm-svn: 71449
2009-05-11 18:06:05 +00:00
Dan Gohman
7ee3a4371f
Upgrade this example to new-style syntax.
...
llvm-svn: 71447
2009-05-11 18:04:52 +00:00
Chris Lattner
17a999efac
remove some done things: we have nocapture and SROA is smarter.
...
llvm-svn: 71443
2009-05-11 17:41:40 +00:00
Chris Lattner
183a7ec027
add a note
...
llvm-svn: 71442
2009-05-11 17:36:33 +00:00
Eli Friedman
f2d589fe24
Remove a completed optimization. Add a potential optimization I ran
...
into.
llvm-svn: 71352
2009-05-09 08:40:15 +00:00
Chris Lattner
356d974a93
add a note
...
llvm-svn: 67953
2009-03-28 19:26:55 +00:00
Nick Lewycky
5c10a3aa7f
Add a totally synthetic situation I came up with while looking at a bug in
...
related code.
llvm-svn: 65437
2009-02-25 06:52:48 +00:00
Torok Edwin
87d5ca083b
add note about sin
...
llvm-svn: 65137
2009-02-20 18:42:06 +00:00
Torok Edwin
3cedd4dc64
add note about possible GEP improvement with fields of size 0.
...
llvm-svn: 62925
2009-01-24 19:30:25 +00:00
Chris Lattner
705ac7082b
add a note
...
llvm-svn: 62760
2009-01-22 07:16:03 +00:00
Dan Gohman
83d2e066c1
Add a README entry noticed while investigating PR3216.
...
llvm-svn: 62558
2009-01-20 01:07:33 +00:00
Chris Lattner
6c2ee50e28
add some more crazy strlen and memcpy stuff I noticed in spec.
...
llvm-svn: 61918
2009-01-08 07:34:55 +00:00
Chris Lattner
7cb3ae0505
add some notes about strlen craziness in eon.
...
llvm-svn: 61917
2009-01-08 06:52:57 +00:00
Chris Lattner
a41422566b
add a note
...
llvm-svn: 61513
2008-12-31 00:54:13 +00:00
Chris Lattner
8a35adf3a5
add some notes for simplifylibcalls optimizations
...
llvm-svn: 61385
2008-12-23 20:52:52 +00:00
Chris Lattner
5d196e64f1
add some more notes.
...
llvm-svn: 61033
2008-12-15 08:32:28 +00:00
Chris Lattner
81ee731852
Add a testcase for GCC PR 23455, which lpre handles now. Add some
...
comments about why we're not getting other cases.
llvm-svn: 61032
2008-12-15 07:49:24 +00:00
Chris Lattner
3c2c36b590
gvn now hoists this load out of the hot non-call path.
...
llvm-svn: 61028
2008-12-15 06:34:48 +00:00
Chris Lattner
56fe52e287
move an entry, add some notes, remove a completed item (IMPLICIT_DEF)
...
llvm-svn: 60821
2008-12-10 01:30:48 +00:00
Chris Lattner
a163568c03
improve a note.
...
llvm-svn: 60636
2008-12-07 00:15:10 +00:00
Chris Lattner
da93063acc
some more PRE/GVN/DSE related notes.
...
llvm-svn: 60633
2008-12-06 22:52:12 +00:00
Chris Lattner
543d6c65fa
some random notes.
...
llvm-svn: 60624
2008-12-06 19:28:22 +00:00
Chris Lattner
0cdc0bbb8a
add a note
...
llvm-svn: 60404
2008-12-02 06:32:34 +00:00
Bill Wendling
85de4b35ca
- Remove the buggy -X/C -> X/-C transform. This isn't valid when X isn't a
...
constant. If X is a constant, then this is folded elsewhere.
- Added a note to Target/README.txt to indicate that we'd like to implement
this when we're able.
llvm-svn: 60399
2008-12-02 05:12:47 +00:00
Bill Wendling
5b902c5b1e
Implement ((A|B)&1)|(B&-2) -> (A&1) | B transformation. This also takes care of
...
permutations of this pattern.
llvm-svn: 60312
2008-12-01 01:07:11 +00:00
Bill Wendling
de89bc275c
Add instruction combining for ((A&~B)|(~A&B)) -> A^B and all permutations.
...
llvm-svn: 60291
2008-11-30 13:52:49 +00:00
Bill Wendling
9eef421e12
Implement (A&((~A)|B)) -> A&B transformation in the instruction combiner. This
...
takes care of all permutations of this pattern.
llvm-svn: 60290
2008-11-30 13:08:13 +00:00
Eli Friedman
e16c0ff1d3
Moving potential optimizations out of PR2330 into lib/Target/README.txt.
...
Hopefully this isn't too much stuff to dump into this file.
llvm-svn: 60285
2008-11-30 07:36:04 +00:00
Nick Lewycky
edd5d3e4e9
Also update the README.
...
llvm-svn: 60188
2008-11-27 22:41:45 +00:00
Nick Lewycky
b3dc4ad5b4
Add a synthetic missed optimization.
...
llvm-svn: 60186
2008-11-27 22:12:22 +00:00
Torok Edwin
33986d8f17
move the note to the correct README
...
llvm-svn: 58104
2008-10-24 19:23:07 +00:00
Torok Edwin
fcaae54669
add note about va_arg code on x86 and x86-64
...
llvm-svn: 58103
2008-10-24 19:20:05 +00:00
Dan Gohman
209fc26462
This is now partly done.
...
llvm-svn: 57734
2008-10-17 21:39:27 +00:00
Chris Lattner
9b83197b76
move PR1941 here.
...
llvm-svn: 57586
2008-10-15 16:33:52 +00:00
Chris Lattner
6d275fd6e1
move PR1604 here.
...
llvm-svn: 57582
2008-10-15 16:06:03 +00:00
Chris Lattner
843dacc937
move PR1488 into this file.
...
llvm-svn: 57579
2008-10-15 16:02:15 +00:00
Chris Lattner
117792afec
add a note
...
llvm-svn: 57557
2008-10-15 05:53:25 +00:00
Chris Lattner
f9325e5f67
this case is matched now.
...
llvm-svn: 57096
2008-10-05 02:16:12 +00:00
Chris Lattner
d7dd8b8aeb
add a note
...
llvm-svn: 54985
2008-08-19 06:22:16 +00:00
Chris Lattner
113b336caa
move some more stuff out of my email into readme.txt
...
llvm-svn: 54603
2008-08-10 01:14:08 +00:00
Chris Lattner
4afb010309
add a note
...
llvm-svn: 54602
2008-08-10 00:47:21 +00:00
Chris Lattner
8377c02308
Add a note.
...
llvm-svn: 53535
2008-07-14 00:19:59 +00:00
Nick Lewycky
035fe6f716
Peer through sext/zext when looking for not(cmp).
...
llvm-svn: 51819
2008-05-31 19:01:33 +00:00
Nick Lewycky
69a51cbd6d
Yay us! Every one of these examples turns into icmp/zext/ret.
...
llvm-svn: 51818
2008-05-31 18:20:26 +00:00
Chris Lattner
1bafa6c886
trip count computation deficiency
...
llvm-svn: 51222
2008-05-17 15:37:38 +00:00
Nick Lewycky
9fb8908457
Moved from PR1570.
...
llvm-svn: 48965
2008-03-30 19:07:11 +00:00
Chris Lattner
fd5fe2a83d
add a note.
...
llvm-svn: 48583
2008-03-20 04:46:13 +00:00
Chris Lattner
af8d3c6699
various rotate fun.
...
llvm-svn: 48438
2008-03-17 01:47:51 +00:00
Chris Lattner
d51372aa96
another random note
...
llvm-svn: 47831
2008-03-02 19:29:42 +00:00
Chris Lattner
647c6642e7
Move pr717 to here.
...
llvm-svn: 47803
2008-03-02 02:51:40 +00:00
Chris Lattner
643dce1146
add a note
...
llvm-svn: 47720
2008-02-28 17:21:27 +00:00
Chris Lattner
765be8874d
target-indep codegen memcpy lowering issue.
...
llvm-svn: 47705
2008-02-28 05:34:27 +00:00
Chris Lattner
6bb6a55f01
upgrade some tests.
...
llvm-svn: 47280
2008-02-18 18:46:39 +00:00
Nate Begeman
0fddc34485
Add a note
...
llvm-svn: 47279
2008-02-18 18:39:23 +00:00
Chris Lattner
afb514a7b4
clarify a note
...
llvm-svn: 45914
2008-01-12 18:58:46 +00:00
Chris Lattner
87b0c13104
add some notes.
...
llvm-svn: 45854
2008-01-11 06:17:47 +00:00
Chris Lattner
1d07b65add
add a note
...
llvm-svn: 45837
2008-01-10 18:25:41 +00:00
Chris Lattner
45e5032b1d
add a note
...
llvm-svn: 45766
2008-01-09 00:17:57 +00:00
Chris Lattner
730d088be1
possible switch lowering improvement.
...
llvm-svn: 45720
2008-01-07 21:38:14 +00:00
Chris Lattner
d7857eafd0
add a note
...
llvm-svn: 45698
2008-01-07 07:46:23 +00:00
Chris Lattner
4e6cbb2fe2
this is done.
...
llvm-svn: 45408
2007-12-29 19:38:02 +00:00
Chris Lattner
7cafd92aa9
expand note.
...
llvm-svn: 45393
2007-12-29 01:05:01 +00:00
Chris Lattner
9d53b611d1
add a note.
...
llvm-svn: 45388
2007-12-28 22:30:05 +00:00
Chris Lattner
180f0e9044
add a note
...
llvm-svn: 45377
2007-12-28 04:42:05 +00:00
Christopher Lamb
8b09a464b4
Fold certain additions through selects (and their compares) so as to eliminate subtractions. This code is often produced by the SMAX expansion in SCEV.
...
This implements test/Transforms/InstCombine/2007-12-18-AddSelCmpSub.ll
llvm-svn: 45158
2007-12-18 09:34:41 +00:00
Chris Lattner
52a9e40789
add a missed case.
...
llvm-svn: 45141
2007-12-18 01:19:18 +00:00
Chris Lattner
7c709a5d08
implement a readme entry, compiling the code into:
...
_foo:
movl $12, %eax
andl 4(%esp), %eax
movl _array(%eax), %eax
ret
instead of:
_foo:
movl 4(%esp), %eax
shrl $2, %eax
andl $3, %eax
movl _array(,%eax,4), %eax
ret
As it turns out, this triggers all the time, in a wide variety of
situations, for example, I see diffs like this in various programs:
- movl 8(%eax), %eax
- shll $2, %eax
- andl $1020, %eax
- movl (%esi,%eax), %eax
+ movzbl 8(%eax), %eax
+ movl (%esi,%eax,4), %eax
- shll $2, %edx
- andl $1020, %edx
- movl (%edi,%edx), %edx
+ andl $255, %edx
+ movl (%edi,%edx,4), %edx
Unfortunately, I also see stuff like this, which can be fixed in the
X86 backend:
- andl $85, %ebx
- addl _bit_count(,%ebx,4), %ebp
+ shll $2, %ebx
+ andl $340, %ebx
+ addl _bit_count(%ebx), %ebp
llvm-svn: 44656
2007-12-06 07:33:36 +00:00
Chris Lattner
5e224c32f4
add a note
...
llvm-svn: 44638
2007-12-05 23:05:06 +00:00
Chris Lattner
4d4e9cdb62
add a note
...
llvm-svn: 42573
2007-10-03 06:10:59 +00:00
Chris Lattner
9958b82733
add a note
...
llvm-svn: 36811
2007-05-05 22:44:08 +00:00
Chris Lattner
2cca31f77f
the mason example is implemented. Move some examples out of llvm/test,
...
upgrade the syntax of some other examples.
llvm-svn: 36806
2007-05-05 22:29:06 +00:00
Chris Lattner
43cab75914
add a bad case evan though of.
...
llvm-svn: 35296
2007-03-24 06:01:32 +00:00
Chris Lattner
9b3e2b4ad9
minor updates
...
llvm-svn: 35143
2007-03-18 22:41:33 +00:00
Nick Lewycky
f764441977
This is implemented. We now generate:
...
entry:
icmp ugt i32 %x, 4 ; <i1>:0 [#uses=1]
br i1 %0, label %cond_true, label %cond_false
cond_true: ; preds = %entry
%tmp1 = tail call i32 (...)* @bar( i32 12 ) ; <i32> [#uses=0]
ret void
cond_false: ; preds = %entry
switch i32 %x, label %cond_true15 [
i32 4, label %cond_true3
i32 3, label %cond_true7
i32 2, label %cond_true11
i32 0, label %cond_false17
]
...
llvm-svn: 35142
2007-03-18 14:37:20 +00:00
Reid Spencer
09575bac2e
For PR1195:
...
Change use of "packed" term to "vector" in comments, strings, variable
names, etc.
llvm-svn: 34300
2007-02-15 03:39:18 +00:00
Chris Lattner
09a32e42bd
add a note
...
llvm-svn: 34249
2007-02-13 21:44:43 +00:00
Chris Lattner
89e5813312
add a note: we need whole-function selectiondags :)
...
llvm-svn: 33252
2007-01-16 06:39:48 +00:00
Reid Spencer
266e42b312
For PR950:
...
This patch removes the SetCC instructions and replaces them with the ICmp
and FCmp instructions. The SetCondInst instruction has been removed and
been replaced with ICmpInst and FCmpInst.
llvm-svn: 32751
2006-12-23 06:05:41 +00:00
Chris Lattner
feeb9c7be5
Evan implemented the machineinstr improvements.
...
The rot example works if the type is cast to ubyte.
Move sroa examples together and upgrade them to HEAD syntax.
llvm-svn: 32423
2006-12-11 00:44:03 +00:00
Chris Lattner
4d475f6e6e
add a note
...
llvm-svn: 32347
2006-12-08 02:01:32 +00:00
Chris Lattner
0d67dde00a
done
...
llvm-svn: 32013
2006-11-29 07:21:46 +00:00
Chris Lattner
6dc22332bf
add a note
...
llvm-svn: 31719
2006-11-14 01:57:53 +00:00
Nick Lewycky
0df2ada9d4
Cute example from Chris Lattner.
...
llvm-svn: 31696
2006-11-13 00:23:28 +00:00
Chris Lattner
4e03cb1945
add a note about viterbi
...
llvm-svn: 31612
2006-11-10 00:23:26 +00:00
Chris Lattner
7e885005ba
add a note
...
llvm-svn: 31477
2006-11-06 21:26:49 +00:00
Chris Lattner
2048373e71
add a note
...
llvm-svn: 31429
2006-11-03 22:27:39 +00:00
Reid Spencer
7e80b0b31e
For PR950:
...
Make necessary changes to support DIV -> [SUF]Div. This changes llvm to
have three division instructions: signed, unsigned, floating point. The
bytecode and assembler are bacwards compatible, however.
llvm-svn: 31195
2006-10-26 06:15:43 +00:00
Chris Lattner
f054003ba7
new bad case
...
llvm-svn: 31156
2006-10-24 16:12:47 +00:00
Chris Lattner
3cbd1604f8
add a note about a general improvement to the code generator
...
llvm-svn: 30642
2006-09-28 06:01:17 +00:00