Jim Laskey
b17434dc1d
Right size integer values before emitting.
...
llvm-svn: 25489
2006-01-20 21:02:36 +00:00
Robert Bocchino
4b41c8e929
Make the C writer work with packed types. printContainedStructs is
...
still not quite right and will be fixed later.
llvm-svn: 25488
2006-01-20 20:43:57 +00:00
Jim Laskey
7a3e9aa282
Reworked how Dwarf debug info entries and abbreviations are handled. Added
...
pubnames and debuy str sections.
llvm-svn: 25487
2006-01-20 20:34:06 +00:00
Duraid Madina
f54c9395e7
remove RET hack, add proper support for rets (watching out for ret voids)
...
llvm-svn: 25486
2006-01-20 20:24:31 +00:00
Chris Lattner
eca87342b4
Simplify CWriter::printContainedStructs, also allowing it to work with
...
PackedTypes as a side-effect.
llvm-svn: 25485
2006-01-20 18:57:03 +00:00
Chris Lattner
335b46dd20
LowerReturn now doesn't have to handle f32 returns.
...
llvm-svn: 25484
2006-01-20 18:41:25 +00:00
Chris Lattner
15afe462a8
remove some unintentionally committed code
...
llvm-svn: 25483
2006-01-20 18:40:10 +00:00
Chris Lattner
222ceabbee
If the target doesn't support f32 natively, insert the FP_EXTEND in target-indep
...
code, so that the LowerReturn code doesn't have to handle it.
llvm-svn: 25482
2006-01-20 18:38:32 +00:00
Robert Bocchino
69d621387c
Fixed InitializeMemory to handle ConstantPacked.
...
llvm-svn: 25481
2006-01-20 18:18:40 +00:00
Chris Lattner
61590dd739
Remove dead expression.
...
llvm-svn: 25480
2006-01-20 18:04:43 +00:00
Chris Lattner
06784ff9ab
Don't use invalidated use_iterator's. This fixes a crash compiling povray
...
llvm-svn: 25479
2006-01-20 18:01:41 +00:00
Duraid Madina
4026e12e85
fix sext breakage: now we correctly deal with functions that return
...
int vs uint
llvm-svn: 25478
2006-01-20 16:10:05 +00:00
Jeff Cohen
8ca86aa918
Update Windows version of config.h to note availability of floor/floorf/ceil/ceilf.
...
Also pulled Windows-specific modifications to config.h.in to a separate file, so
that changes to it trigger regeneration of config.h (which doesn't happen when the
custom build step for it changes).
llvm-svn: 25477
2006-01-20 04:34:45 +00:00
Duraid Madina
9a8fb20689
fix storing bools! eek!
...
llvm-svn: 25476
2006-01-20 03:40:25 +00:00
Reid Spencer
855d31f847
Add a test case for PR697, ensuring the linker works with ConstantPacked.
...
llvm-svn: 25475
2006-01-20 01:31:58 +00:00
Evan Cheng
0c5de2864f
Stop doing that accidental commit.
...
llvm-svn: 25474
2006-01-20 01:14:05 +00:00
Evan Cheng
cce748d316
A few more SH{L|R}D peepholes.
...
llvm-svn: 25473
2006-01-20 01:13:30 +00:00
Evan Cheng
9a4ab9660f
Added a load folding bug test case.
...
llvm-svn: 25472
2006-01-20 01:12:23 +00:00
Evan Cheng
e272b4ec17
Prevent folding of a node with multiple uses if the node already folds a load!
...
Here is an example where the load ended up being done twice:
%A = global uint 0
uint %test(uint %B, ubyte %C) {
%tmp = load uint *%A;
%X = shl uint %tmp, ubyte %C
%Cv = sub ubyte 32, %C
%Y = shr uint %B, ubyte %Cv
%Z = or uint %Y, %X
store uint %Z, uint* %A
ret uint %Z
}
==>
subl $4, %esp
movl %ebx, (%esp)
movl 8(%esp), %edx
movl A, %eax
movb 12(%esp), %bl
movb %bl, %cl
shldl %cl, %edx, %eax
movb %bl, %cl
shldl %cl, %edx, A
movl (%esp), %ebx
addl $4, %esp
ret
llvm-svn: 25471
2006-01-20 01:11:03 +00:00
Robert Bocchino
027c18da98
ConstantFoldLoadThroughGEPConstantExpr wasn't handling pointers to
...
packed types correctly.
llvm-svn: 25470
2006-01-19 23:53:23 +00:00
Evan Cheng
9c30bd5e25
Didn't mean to commit the last one.
...
llvm-svn: 25469
2006-01-19 23:27:08 +00:00
Evan Cheng
8591b9f254
Added i16 SH{L|R}D patterns.
...
llvm-svn: 25468
2006-01-19 23:26:24 +00:00
Chris Lattner
93bde9cbf7
add support for ConstantPacked to the linker
...
llvm-svn: 25467
2006-01-19 23:15:58 +00:00
Chris Lattner
823a00a8b5
Don't include generated lexer .cpp files.
...
llvm-svn: 25466
2006-01-19 22:01:51 +00:00
Evan Cheng
9e7fb7b2fc
Bug fix. Flag operand number may be calculated incorrectly.
...
llvm-svn: 25465
2006-01-19 21:57:10 +00:00
Andrew Lenharth
5df67bcd50
typo
...
llvm-svn: 25464
2006-01-19 21:10:38 +00:00
Andrew Lenharth
688ea707d8
nasty nasty patterns
...
llvm-svn: 25463
2006-01-19 20:49:37 +00:00
Duraid Madina
550d8ec1ad
fix boolean XOR (which fixes up comparisons..)
...
llvm-svn: 25462
2006-01-19 15:18:56 +00:00
Duraid Madina
4d69a01254
BOOM!
...
llvm-svn: 25460
2006-01-19 14:14:11 +00:00
Duraid Madina
bcbcfac6ea
click click
...
llvm-svn: 25459
2006-01-19 14:13:11 +00:00
Evan Cheng
a15731cd50
Use pattern information to determine whether the use expects this
...
instruction to produce a result. e.g MUL8m, the instruction does not
produce a explicit result. However it produces an implicit result in
AL which would be copied to a temp. The root operator of the matching
pattern is a mul so the use would expect it to produce a result.
llvm-svn: 25458
2006-01-19 10:12:58 +00:00
Evan Cheng
3d2cc7e2e9
Avoid generating a redundant setcc.
...
llvm-svn: 25457
2006-01-19 08:52:46 +00:00
Reid Spencer
ade182125f
For PR696:
...
Don't do floor->floorf conversion if floorf is not available. This checks
the compiler's host, not its target, which is incorrect for cross-compilers
Not sure that's important as we don't build many cross-compilers.
llvm-svn: 25456
2006-01-19 08:36:56 +00:00
Duraid Madina
29b9d7cdff
fix calls that return f32
...
llvm-svn: 25455
2006-01-19 08:31:51 +00:00
Reid Spencer
ec4a7f52fe
Make sure that libm is used during config tests so that ceil, floor, and
...
friends are actually detected.
llvm-svn: 25454
2006-01-19 08:31:08 +00:00
Reid Spencer
364473ce17
For PR696:
...
Add checks for ceil, ceilf, floor, and floorf
llvm-svn: 25453
2006-01-19 08:22:40 +00:00
Chris Lattner
e154abf9b3
Implement casts.ll:test26: a cast from float -> double -> integer, doesn't
...
need the float->double part.
llvm-svn: 25452
2006-01-19 07:40:22 +00:00
Chris Lattner
ef25927f4f
Add a new testcase for an eliminable cast
...
llvm-svn: 25451
2006-01-19 07:39:20 +00:00
Chris Lattner
2efef3d6f1
implement support for f32 arguments past the first 6 words
...
llvm-svn: 25450
2006-01-19 07:22:29 +00:00
Reid Spencer
9ce6f39ccb
This test passes now.
...
llvm-svn: 25449
2006-01-19 07:15:47 +00:00
Reid Spencer
bf31906660
1. Identify bytecode modules that have upgraded intrinsics by setting a
...
boolean flag if we read a function prototype that needs upgrading.
2. Don't upgrade the CallInst instruction until after its been inserted
into the basic block, and only if we know that we have seen an
upgraded intrinsic function.
llvm-svn: 25448
2006-01-19 07:02:16 +00:00
Reid Spencer
75b9567671
Don't forget about casting the result of an upgraded call to an intrinsic
...
in the case where it needs to cast back to a signed type.
llvm-svn: 25447
2006-01-19 07:00:29 +00:00
Reid Spencer
6b68c057b4
1. Documentation upgrade.
...
2. Have UpgradeInstrinicCall return an Instruction* instead of a CallInst*
and return the needed CastInst* if the result of the upgraded call needs
to be casted back to a signed type.
llvm-svn: 25446
2006-01-19 06:59:26 +00:00
Reid Spencer
7e63a456a0
Add a flag to identify bytecode files that have intrinsic functions that
...
need to be upgraded.
llvm-svn: 25445
2006-01-19 06:57:58 +00:00
Evan Cheng
91007126c2
adc and sbb need an incoming flag to ensure it reads the carry flag
...
from add / sub.
llvm-svn: 25444
2006-01-19 06:53:20 +00:00
Chris Lattner
800ad5287c
make this work for Reid, who renamed his CVS module dir :)
...
llvm-svn: 25443
2006-01-19 06:49:46 +00:00
Chris Lattner
76a08b2f18
new testcase the autoupgrader in the bc reader fails to handle
...
llvm-svn: 25442
2006-01-19 06:15:34 +00:00
Reid Spencer
4cdceb7203
Make get_suffix faster by using a switch on getTypeID rather than a series
...
of comparisons on the various type objects.
llvm-svn: 25441
2006-01-19 05:37:27 +00:00
Evan Cheng
13e8c9d6de
Another typo
...
llvm-svn: 25440
2006-01-19 04:54:52 +00:00
Chris Lattner
c3c27032d0
add a note
...
llvm-svn: 25439
2006-01-19 02:09:38 +00:00
Evan Cheng
a7bfbe996e
Two peepholes:
...
(or (x >> c) | (y << (32 - c))) ==> (shrd x, y, c)
(or (x << c) | (y >> (32 - c))) ==> (shld x, y, c)
llvm-svn: 25438
2006-01-19 01:56:29 +00:00
Evan Cheng
acec02ebf5
Prevent unnecessary CopyToReg when the same HW register appears in two spots
...
in the pattern.
llvm-svn: 25437
2006-01-19 01:55:45 +00:00
Evan Cheng
6135a7a546
Didn't mean to check that in.
...
llvm-svn: 25436
2006-01-19 01:52:56 +00:00
Evan Cheng
267ba5965e
A obvious typo
...
llvm-svn: 25435
2006-01-19 01:46:14 +00:00
Reid Spencer
c8a9fafcfc
Make sure intrinsic auto-upgrade is invoked correctly.
...
llvm-svn: 25434
2006-01-19 01:21:04 +00:00
Reid Spencer
f8592bdea5
Don't accept the ctpop, cttz, or ctlz intrinsics with signed arguments. The
...
interface requires unsigned arguments.
llvm-svn: 25433
2006-01-19 01:20:03 +00:00
Reid Spencer
e0aa7c7ded
Add a new interface function to AutoUpgrade for simultaneously upgrading
...
the Function and the CallInst: UpgradeCallsToIntrinsic(Function*). Also,
re-factor the AutoUpgrade implementation to eliminate some duplication of
code.
llvm-svn: 25432
2006-01-19 01:18:29 +00:00
Reid Spencer
e64af05eed
Expand test to cover the non-overloaded variants of the arithmetic and
...
floating point intrinsics.
llvm-svn: 25431
2006-01-19 01:17:06 +00:00
Chris Lattner
7be2203c9f
If not internalizing, don't mark llvm.global[cd]tors const, as a fix for a
...
hypothetical future boog.
llvm-svn: 25430
2006-01-19 00:46:54 +00:00
Chris Lattner
d693b7943a
Don't internalize llvm.global[cd]tor unless there are uses of it. This
...
unbreaks front-ends that don't use __main (like the new CFE).
llvm-svn: 25429
2006-01-19 00:40:39 +00:00
Andrew Lenharth
7599b6e4af
was ignoring the legalized chain in this case, fixed SPASS on alpha
...
llvm-svn: 25428
2006-01-18 23:19:08 +00:00
Andrew Lenharth
88f3d3f893
a reduced test case, the GlobalAddress is never legalized
...
llvm-svn: 25427
2006-01-18 22:59:33 +00:00
Nate Begeman
569c439567
Get rid of code in the DAGCombiner that is duplicated in SelectionDAG.cpp
...
Now all constant folding in the code generator is in one place.
llvm-svn: 25426
2006-01-18 22:35:16 +00:00
Chris Lattner
e2ee190821
Temporary work around for a libcall insertion bug: If a target doesn't
...
support FSIN/FCOS nodes, do not lower sin/cos to them.
llvm-svn: 25425
2006-01-18 21:50:14 +00:00
Chris Lattner
b98282d2d6
Make sure that cloning a module clones its target triple and dependent
...
library list as well. This should help bugpoint.
llvm-svn: 25424
2006-01-18 21:32:45 +00:00
Chris Lattner
ce5066c863
Don't assert on 'select_cc SETUO'
...
llvm-svn: 25423
2006-01-18 19:42:35 +00:00
Chris Lattner
36eba3a49b
fix out of date comment
...
llvm-svn: 25422
2006-01-18 19:37:44 +00:00
Chris Lattner
15e7642ab1
Fix Regression/CodeGen/PowerPC/2006-01-18-InvalidBranchOpcodeAssert.ll
...
llvm-svn: 25421
2006-01-18 19:35:21 +00:00
Chris Lattner
48e653ea88
new testcase
...
llvm-svn: 25420
2006-01-18 19:16:07 +00:00
Chris Lattner
5fee908be5
Fix a backwards conditional that caused an inf loop in some cases. This
...
fixes: test/Regression/CodeGen/Generic/2005-01-18-SetUO-InfLoop.ll
llvm-svn: 25419
2006-01-18 19:13:41 +00:00
Chris Lattner
4d148f2ece
this testcase sent the dag combiner spinning into an infinite loop
...
llvm-svn: 25418
2006-01-18 19:13:11 +00:00
Jim Laskey
194a5268cb
Added minimum Dwarf aranges. Cleaned up some section headers. Line number
...
support now works in gdb.
llvm-svn: 25417
2006-01-18 16:54:26 +00:00
Evan Cheng
621674a19d
SRA shift amount must be in i8
...
llvm-svn: 25416
2006-01-18 09:26:46 +00:00
Evan Cheng
4b3774e0a2
If a call return type is i1, insert a truncate from X86::AL to i1.
...
llvm-svn: 25415
2006-01-18 08:08:38 +00:00
John Criswell
0e9bd5a416
Fixed style of curly brace. No functionality changes.
...
llvm-svn: 25414
2006-01-17 22:01:57 +00:00
Evan Cheng
feaed4d107
Fix lowering of calls which return f32 values.
...
llvm-svn: 25413
2006-01-17 21:58:21 +00:00
Jim Laskey
5e131f8d31
Pastos.
...
llvm-svn: 25412
2006-01-17 21:39:39 +00:00
Chris Lattner
dce31c8d70
fix a broken comment
...
llvm-svn: 25411
2006-01-17 21:31:18 +00:00
Jim Laskey
cc9dfecf81
Add frame work for additional dwarf sections. Comments will improve as code
...
is added.
llvm-svn: 25410
2006-01-17 20:41:40 +00:00
Robert Bocchino
1763a44ac2
Test case for the insertelement operation.
...
llvm-svn: 25409
2006-01-17 20:07:30 +00:00
Robert Bocchino
ca27f0320b
VMCore support for the insertelement operation.
...
llvm-svn: 25408
2006-01-17 20:07:22 +00:00
Robert Bocchino
e6336a9b69
Constant folding support for the insertelement operation.
...
llvm-svn: 25407
2006-01-17 20:07:07 +00:00
Robert Bocchino
6dce25019d
Lowerpacked and SCCP support for the insertelement operation.
...
llvm-svn: 25406
2006-01-17 20:06:55 +00:00
Robert Bocchino
03e95af9f7
Support for the insertelement operation.
...
llvm-svn: 25405
2006-01-17 20:06:42 +00:00
Robert Bocchino
c744cbe160
Reader support for the insertelement operation.
...
llvm-svn: 25404
2006-01-17 20:06:35 +00:00
Robert Bocchino
fdf9e41848
Lexer and parser support for the insertelement operation.
...
llvm-svn: 25403
2006-01-17 20:06:25 +00:00
Robert Bocchino
b52d0a3415
Instruction and constant expression definitions for the insertelement
...
operation.
llvm-svn: 25402
2006-01-17 20:05:59 +00:00
Evan Cheng
6f86a7db07
Bug fix: missing LegalizeOp() on newly created nodes.
...
llvm-svn: 25401
2006-01-17 19:47:13 +00:00
Evan Cheng
d1a23c10f2
Suppress "no newline at end of file" warnings.
...
llvm-svn: 25400
2006-01-17 19:21:01 +00:00
Jim Laskey
b125003bf4
Misc. errors.
...
llvm-svn: 25399
2006-01-17 19:12:24 +00:00
Chris Lattner
801f47512d
Clean up the FFS optimization code, and make it correctly create the appropriate
...
unsigned llvm.cttz.* intrinsic, fixing the 2005-05-11-Popcount-ffs-fls regression
last night.
llvm-svn: 25398
2006-01-17 18:27:17 +00:00
Jim Laskey
b9966029fe
Adding basic support for Dwarf line number debug information.
...
I promise to keep future commits smaller.
llvm-svn: 25396
2006-01-17 17:31:53 +00:00
Jim Laskey
f9978d8a0b
Adding UniqueVector.
...
llvm-svn: 25395
2006-01-17 17:29:20 +00:00
John Criswell
5ed803256d
Regenerated the Lex and Yacc output files on Linux. It seems that our
...
Linux machines don't like the source code generated on MacOS X for some
reason.
llvm-svn: 25394
2006-01-17 17:01:34 +00:00
Jim Laskey
d7767aa87b
Reduce memory consumption and force (somewhat) access to entries via ID.
...
llvm-svn: 25393
2006-01-17 16:29:58 +00:00
Evan Cheng
61864ec3fe
Emit a type matching check for ComplexPatterns.
...
llvm-svn: 25392
2006-01-17 07:36:41 +00:00
Evan Cheng
14417ed99c
Zero extending load from i1 to i8.
...
llvm-svn: 25391
2006-01-17 07:02:46 +00:00
Chris Lattner
514a8f89d0
Ensure that the CFE always emits intrinsics in their unsigned version, not with signed operands
...
llvm-svn: 25390
2006-01-17 06:24:01 +00:00
Jeff Cohen
234e078947
Visual Studio still has issues with being left out.
...
llvm-svn: 25389
2006-01-17 05:13:22 +00:00
Duraid Madina
e08a95d3c1
oops, this shouldn't have gotten in
...
llvm-svn: 25388
2006-01-17 03:09:48 +00:00