Jim Laskey
6ae9f53d2c
Accidental enable of bad code
...
llvm-svn: 30601
2006-09-25 21:11:32 +00:00
Jim Laskey
640b7dbed5
Fix chain dropping in load and drop unused stores in ret blocks.
...
llvm-svn: 30600
2006-09-25 19:32:58 +00:00
John Criswell
eda10c2fcd
Regression test for PR#922.
...
llvm-svn: 30599
2006-09-25 19:12:01 +00:00
Chris Lattner
2281c3f6ca
more notes
...
llvm-svn: 30598
2006-09-25 17:12:14 +00:00
Jim Laskey
ba2f6127b2
Core antialiasing for load and store.
...
llvm-svn: 30597
2006-09-25 16:29:54 +00:00
Andrew Lenharth
9746e69742
Fix
...
llvm-svn: 30596
2006-09-25 14:04:53 +00:00
Andrew Lenharth
55851a4bfd
Fix jump tables to match gcc (and the ABI and whatnot)
...
llvm-svn: 30594
2006-09-24 19:46:56 +00:00
Andrew Lenharth
58f5a24f0c
Add support for other relocation bases to jump tables, as well as custom asm directives
...
llvm-svn: 30593
2006-09-24 19:45:58 +00:00
Andrew Lenharth
c6ed3c74e7
basic jump table test
...
llvm-svn: 30592
2006-09-24 19:42:02 +00:00
Andrew Lenharth
f6b4462853
jump table note
...
llvm-svn: 30591
2006-09-24 13:13:10 +00:00
Evan Cheng
2086ffb27b
PIC jump table entries are always 32-bit. This fixes PIC jump table support on X86-64.
...
llvm-svn: 30590
2006-09-24 05:22:38 +00:00
Nick Lewycky
d97d360598
Enable 'predsimplify' optimization.
...
llvm-svn: 30589
2006-09-24 00:08:16 +00:00
Nick Lewycky
800fff3067
Style changes only. Remove dead code, fix a comment.
...
llvm-svn: 30588
2006-09-23 15:13:08 +00:00
Chris Lattner
c0f674b9fd
Be far more careful when splitting a loop header, either to form a preheader
...
or when splitting loops with a common header into multiple loops. In particular
the old code would always insert the preheader before the old loop header. This
is disasterous in cases where the loop hasn't been rotated. For example, it can
produce code like:
.. outside the loop...
jmp LBB1_2 #bb13.outer
LBB1_1: #bb1
movsd 8(%esp,%esi,8), %xmm1
mulsd (%edi), %xmm1
addsd %xmm0, %xmm1
addl $24, %edi
incl %esi
jmp LBB1_3 #bb13
LBB1_2: #bb13.outer
leal (%edx,%eax,8), %edi
pxor %xmm1, %xmm1
xorl %esi, %esi
LBB1_3: #bb13
movapd %xmm1, %xmm0
cmpl $4, %esi
jl LBB1_1 #bb1
Note that the loop body is actually LBB1_1 + LBB1_3, which means that the
loop now contains an uncond branch WITHIN it to jump around the inserted
loop header (LBB1_2). Doh.
This patch changes the preheader insertion code to insert it in the right
spot, producing this code:
... outside the loop, fall into the header ...
LBB1_1: #bb13.outer
leal (%edx,%eax,8), %esi
pxor %xmm0, %xmm0
xorl %edi, %edi
jmp LBB1_3 #bb13
LBB1_2: #bb1
movsd 8(%esp,%edi,8), %xmm0
mulsd (%esi), %xmm0
addsd %xmm1, %xmm0
addl $24, %esi
incl %edi
LBB1_3: #bb13
movapd %xmm0, %xmm1
cmpl $4, %edi
jl LBB1_2 #bb1
Totally crazy, no branch in the loop! :)
llvm-svn: 30587
2006-09-23 08:19:21 +00:00
Chris Lattner
56c1c10ca1
Teach UpdateDomInfoForRevectoredPreds to handle revectored preds that are not
...
reachable, making it general purpose enough for use by InsertPreheaderForLoop.
Eliminate custom dominfo updating code in InsertPreheaderForLoop, using
UpdateDomInfoForRevectoredPreds instead.
llvm-svn: 30586
2006-09-23 07:40:52 +00:00
Chris Lattner
941d6d205a
remove misleading comment
...
llvm-svn: 30585
2006-09-23 06:09:45 +00:00
Chris Lattner
bf0b610dfa
add method, correct comment
...
llvm-svn: 30584
2006-09-23 04:03:45 +00:00
Evan Cheng
02e193e2ff
Delete dead code; fix 80 col violations.
...
llvm-svn: 30583
2006-09-22 21:43:59 +00:00
Rafael Espindola
9cfd72a3d1
add a note
...
llvm-svn: 30581
2006-09-22 11:36:17 +00:00
Bill Wendling
a609cf48a3
Use "%llvmgxx" instead of "llvm-g++".
...
llvm-svn: 30580
2006-09-22 07:09:01 +00:00
Nate Begeman
29f99e606d
Testcase for better rotate left and mask support
...
llvm-svn: 30579
2006-09-22 05:49:57 +00:00
Bill Wendling
e1c45087bd
Regression testcase for PR855.
...
llvm-svn: 30578
2006-09-22 05:34:25 +00:00
Nate Begeman
7bcce1a7f6
Fold AND and ROTL more often
...
llvm-svn: 30577
2006-09-22 05:01:56 +00:00
Devang Patel
b34118f8bd
remove extra white spaces.
...
llvm-svn: 30576
2006-09-22 01:07:57 +00:00
Devang Patel
8248ba3afc
Use iterative algorith to assign DFS number. This reduces
...
call stack depth.
llvm-svn: 30575
2006-09-22 01:05:33 +00:00
Chris Lattner
86f1992481
don't allow 'imm' or specific imms, like '1' on the LHS of a binop.
...
This shrinks X86GenDAGISel by ~330 lines.
llvm-svn: 30574
2006-09-21 20:46:13 +00:00
Evan Cheng
ce6a660148
Make it work for DAG combine of multi-value nodes.
...
llvm-svn: 30573
2006-09-21 19:04:05 +00:00
Chris Lattner
28d7124afb
Fit to 80 columns.
...
llvm-svn: 30572
2006-09-21 18:28:27 +00:00
Jim Laskey
231343018b
core corrections
...
llvm-svn: 30570
2006-09-21 17:35:47 +00:00
Devang Patel
5bc8dcf913
Use abstract class to facilitate dlopen() interface.
...
llvm-svn: 30569
2006-09-21 17:22:55 +00:00
Jim Laskey
50750cf500
Basic "in frame" alias analysis.
...
llvm-svn: 30568
2006-09-21 16:28:59 +00:00
Rafael Espindola
a51ec7153c
more condition codes
...
llvm-svn: 30567
2006-09-21 13:06:26 +00:00
Rafael Espindola
4de4f87be5
if a constant can't be an immediate, add it to the constant pool
...
llvm-svn: 30566
2006-09-21 11:29:52 +00:00
Chris Lattner
c17b86ef22
fold (aext (and (trunc x), cst)) -> (and x, cst).
...
llvm-svn: 30561
2006-09-21 06:40:43 +00:00
Chris Lattner
d9fca453f1
Check the right value type. This fixes 186.crafty on x86
...
llvm-svn: 30560
2006-09-21 06:17:39 +00:00
Chris Lattner
ba7013ca78
implemented
...
llvm-svn: 30559
2006-09-21 06:14:54 +00:00
Chris Lattner
34768d5361
Compile:
...
int %test(ulong *%tmp) {
%tmp = load ulong* %tmp ; <ulong> [#uses=1]
%tmp.mask = shr ulong %tmp, ubyte 50 ; <ulong> [#uses=1]
%tmp.mask = cast ulong %tmp.mask to ubyte
%tmp2 = and ubyte %tmp.mask, 3 ; <ubyte> [#uses=1]
%tmp2 = cast ubyte %tmp2 to int ; <int> [#uses=1]
ret int %tmp2
}
to:
_test:
movl 4(%esp), %eax
movl 4(%eax), %eax
shrl $18, %eax
andl $3, %eax
ret
instead of:
_test:
movl 4(%esp), %eax
movl 4(%eax), %eax
shrl $18, %eax
# TRUNCATE movb %al, %al
andb $3, %al
movzbl %al, %eax
ret
llvm-svn: 30558
2006-09-21 06:14:31 +00:00
Chris Lattner
eb12877970
Generalize (zext (truncate x)) and (sext (truncate x)) folding to work when
...
the src/dst are not the same size. This catches things like "truncate
32-bit X to 8 bits, then zext to 16", which happens a bit on X86.
llvm-svn: 30557
2006-09-21 06:00:20 +00:00
Chris Lattner
437703d4c9
Fit in 80-cols
...
llvm-svn: 30556
2006-09-21 05:46:00 +00:00
Chris Lattner
e87cf1c708
Fix Transforms/IndVarsSimplify/2006-09-20-LFTR-Crash.ll
...
llvm-svn: 30555
2006-09-21 05:12:20 +00:00
Chris Lattner
0ba3a4b93c
new testcase
...
llvm-svn: 30554
2006-09-21 05:11:01 +00:00
Nick Lewycky
401794f2a7
Fix compile error.
...
llvm-svn: 30553
2006-09-21 02:08:31 +00:00
Nick Lewycky
2aff202559
Don't rewrite ConstantExpr::get.
...
llvm-svn: 30552
2006-09-21 01:05:35 +00:00
Nick Lewycky
eb301d20a6
Once we're down to "setcc type constant1, constant2", at least come up
...
with the right answer.
llvm-svn: 30550
2006-09-20 23:02:24 +00:00
Anton Korobeynikov
59ef7e94eb
Adding codegeneration for StdCall & FastCall calling conventions
...
llvm-svn: 30549
2006-09-20 22:03:51 +00:00
Andrew Lenharth
ce3954cac0
Account for pseudo-ops correctly
...
llvm-svn: 30548
2006-09-20 20:08:52 +00:00
Chris Lattner
663748827c
The DarwinAsmPrinter need not check for isDarwin. createPPCAsmPrinterPass
...
should create the right asmprinter subclass.
llvm-svn: 30542
2006-09-20 17:12:19 +00:00
Chris Lattner
6d66264a5f
Wrap some darwin'isms with isDarwin checks.
...
llvm-svn: 30541
2006-09-20 17:07:15 +00:00
Nick Lewycky
99b3c50130
Use a total ordering to compare instructions.
...
Fixes infinite loop in resolve().
llvm-svn: 30540
2006-09-20 17:04:01 +00:00
Andrew Lenharth
cf0746ba2a
simplify
...
llvm-svn: 30535
2006-09-20 15:37:57 +00:00