oota-llvm.git
18 years agoUpdate for including additional function tests.
Reid Spencer [Mon, 23 Jan 2006 08:15:53 +0000 (08:15 +0000)]
Update for including additional function tests.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25542 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agoRevert last patch because it messes up the JIT, amongst other things.
Reid Spencer [Mon, 23 Jan 2006 08:11:03 +0000 (08:11 +0000)]
Revert last patch because it messes up the JIT, amongst other things.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25541 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agoFor PR411:
Reid Spencer [Mon, 23 Jan 2006 07:42:30 +0000 (07:42 +0000)]
For PR411:
No functionality changes, just improve the code by a) providing better
function names, b) eliminating a call to get_suffix and c) tightening up
a function elimination test to reduce further checking.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25540 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agoFor PR411:
Reid Spencer [Mon, 23 Jan 2006 07:39:03 +0000 (07:39 +0000)]
For PR411:
Don't try to be smart about fixing intrinsic functions when they're read
in, just fix them after the module is read when all names are resolved.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25539 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agoFix Regression/CodeGen/SparcV8/2006-01-22-BitConvertLegalize.ll by making
Chris Lattner [Mon, 23 Jan 2006 07:30:46 +0000 (07:30 +0000)]
Fix Regression/CodeGen/SparcV8/2006-01-22-BitConvertLegalize.ll by making
sure that the result of expanding a BIT_CONVERT node is itself legalized.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25538 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agoTestcase that failed due to a legalizer bug
Chris Lattner [Mon, 23 Jan 2006 07:30:14 +0000 (07:30 +0000)]
Testcase that failed due to a legalizer bug

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25537 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agothis option is gone, the dag isel is the default now
Chris Lattner [Mon, 23 Jan 2006 07:21:12 +0000 (07:21 +0000)]
this option is gone, the dag isel is the default now

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25536 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agoRemove a couple of unnecessary #include's
Evan Cheng [Mon, 23 Jan 2006 07:21:01 +0000 (07:21 +0000)]
Remove a couple of unnecessary #include's

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25535 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agoremove the V8 simple isel
Chris Lattner [Mon, 23 Jan 2006 07:20:15 +0000 (07:20 +0000)]
remove the V8 simple isel

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25534 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agomake this test harder
Chris Lattner [Mon, 23 Jan 2006 07:07:51 +0000 (07:07 +0000)]
make this test harder

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25533 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agoFactor out more instruction scheduler code to the base class.
Evan Cheng [Mon, 23 Jan 2006 07:01:07 +0000 (07:01 +0000)]
Factor out more instruction scheduler code to the base class.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25532 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agodon't need this any more; the "#define hashes to trees" hack is coming
Duraid Madina [Mon, 23 Jan 2006 06:47:56 +0000 (06:47 +0000)]
don't need this any more; the "#define hashes to trees" hack is coming

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25531 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agoadd a bunch more optimizations for unary double math functions
Chris Lattner [Mon, 23 Jan 2006 06:24:46 +0000 (06:24 +0000)]
add a bunch more optimizations for unary double math functions

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25530 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agoadd new tests
Chris Lattner [Mon, 23 Jan 2006 06:24:17 +0000 (06:24 +0000)]
add new tests

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25529 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agoadd checks for new functions. I'd appreciate it if someone could regen
Chris Lattner [Mon, 23 Jan 2006 06:24:09 +0000 (06:24 +0000)]
add checks for new functions.  I'd appreciate it if someone could regen
the configure script :)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25528 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agodie, die!! r15, you are not callee-saved
Duraid Madina [Mon, 23 Jan 2006 06:11:45 +0000 (06:11 +0000)]
die, die!! r15, you are not callee-saved

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25527 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agofix register corruption! (my god.) r15 is a scratch reg, using that as
Duraid Madina [Mon, 23 Jan 2006 06:08:46 +0000 (06:08 +0000)]
fix register corruption! (my god.) r15 is a scratch reg, using that as
a frame pointer is a pretty doofus thing to do. use r5 instead, and
mark it callee-saved, coz that's what it is!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25526 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agoRefactor/genericize this, no functionality change
Chris Lattner [Mon, 23 Jan 2006 05:57:36 +0000 (05:57 +0000)]
Refactor/genericize this, no functionality change

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25525 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agoMake sure this tests the right thing, xfail on solaris, which doesn't have floorf
Chris Lattner [Mon, 23 Jan 2006 05:56:34 +0000 (05:56 +0000)]
Make sure this tests the right thing, xfail on solaris, which doesn't have floorf

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25524 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agoFix bugs lowering stackrestore, fixing 2004-08-12-InlinerAndAllocas.c on
Chris Lattner [Mon, 23 Jan 2006 05:22:07 +0000 (05:22 +0000)]
Fix bugs lowering stackrestore, fixing 2004-08-12-InlinerAndAllocas.c on
PPC.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25522 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agoSpeedup and simplify pass registration by the observation that there is
Chris Lattner [Mon, 23 Jan 2006 01:01:04 +0000 (01:01 +0000)]
Speedup and simplify pass registration by the observation that there is
exactly one PassInfo object per RegisterPass object and that their lifetimes
are the same.  As such, there is no reason for the RegisterPass object to
dynamically allocate the PassInfo object at compiler startup time: just inline
the object by-value.  This should reduce codesize, heap size, and startup time. Yaay.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25521 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agoRemove dead #include
Chris Lattner [Mon, 23 Jan 2006 00:38:14 +0000 (00:38 +0000)]
Remove dead #include

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25520 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agoIt doesn't make sense to give llc a list of passes on the command line,
Chris Lattner [Mon, 23 Jan 2006 00:36:05 +0000 (00:36 +0000)]
It doesn't make sense to give llc a list of passes on the command line,
LLVM doesn't use it and it can't work anyway.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25519 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agothis doesn't work, remove it
Chris Lattner [Mon, 23 Jan 2006 00:32:33 +0000 (00:32 +0000)]
this doesn't work, remove it

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25518 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agoThis only needs <iosfwd> not <iostream>
Chris Lattner [Sun, 22 Jan 2006 23:43:45 +0000 (23:43 +0000)]
This only needs <iosfwd> not <iostream>

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25517 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agoAdd #include of <iostream>
Chris Lattner [Sun, 22 Jan 2006 23:41:42 +0000 (23:41 +0000)]
Add #include of <iostream>

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25516 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agoAdd explicit #includes of <iostream>
Chris Lattner [Sun, 22 Jan 2006 23:41:00 +0000 (23:41 +0000)]
Add explicit #includes of <iostream>

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25515 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agoMake iostream #inclusion explicit
Chris Lattner [Sun, 22 Jan 2006 23:32:06 +0000 (23:32 +0000)]
Make iostream #inclusion explicit

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25514 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agoAdd explicit iostream #includes
Chris Lattner [Sun, 22 Jan 2006 23:19:18 +0000 (23:19 +0000)]
Add explicit iostream #includes

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25513 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agoMake this more efficient in the following ways:
Chris Lattner [Sun, 22 Jan 2006 23:10:26 +0000 (23:10 +0000)]
Make this more efficient in the following ways:
1. Do not statically construct a map when the program starts up, this
   is expensive and cannot be optimized.  Instead, create a list.
2. Do not insert entries for all function in the module into a hashmap
   that lives the full life of the compiler.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25512 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agoThis header should not pull in <iostream>
Chris Lattner [Sun, 22 Jan 2006 22:54:51 +0000 (22:54 +0000)]
This header should not pull in <iostream>

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25511 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agoadd explicit #includes of iostream
Chris Lattner [Sun, 22 Jan 2006 22:53:40 +0000 (22:53 +0000)]
add explicit #includes of iostream

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25510 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agoAdd explicit #includes of <iostream>
Chris Lattner [Sun, 22 Jan 2006 22:53:01 +0000 (22:53 +0000)]
Add explicit #includes of <iostream>

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25509 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agoSeveral non-functionality changing changes:
Chris Lattner [Sun, 22 Jan 2006 22:35:08 +0000 (22:35 +0000)]
Several non-functionality changing changes:
1. Use the varargs version of getOrInsertFunction to simplify code.
2. remove #include
3. Reduce the number of #ifdef's.
4. remove extraneous vertical whitespace.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25508 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agoVisual Studio still has issues at being left out.
Jeff Cohen [Sun, 22 Jan 2006 20:37:25 +0000 (20:37 +0000)]
Visual Studio still has issues at being left out.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25507 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agoVisual Studio neurotic about inconsistent class/struct usage.
Jeff Cohen [Sun, 22 Jan 2006 20:36:43 +0000 (20:36 +0000)]
Visual Studio neurotic about inconsistent class/struct usage.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25506 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agoFix a bug in a recent refactor that caused a bunch of programs to miscompile
Chris Lattner [Sat, 21 Jan 2006 19:12:11 +0000 (19:12 +0000)]
Fix a bug in a recent refactor that caused a bunch of programs to miscompile
or the compiler to crash.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25503 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agoinsignificant, but next up is proper stack frame layout!
Duraid Madina [Sat, 21 Jan 2006 14:27:19 +0000 (14:27 +0000)]
insignificant, but next up is proper stack frame layout!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25497 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agoFix CodeGen/PowerPC/2006-01-20-ShiftPartsCrash.ll
Chris Lattner [Sat, 21 Jan 2006 04:27:00 +0000 (04:27 +0000)]
Fix CodeGen/PowerPC/2006-01-20-ShiftPartsCrash.ll

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25496 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agonew testcase that crashes llc for ppc
Chris Lattner [Sat, 21 Jan 2006 04:25:07 +0000 (04:25 +0000)]
new testcase that crashes llc for ppc

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25495 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agoRename fcmovae to fcmovnb and fcmova to fcmovnbe (following Intel manual).
Evan Cheng [Sat, 21 Jan 2006 02:55:41 +0000 (02:55 +0000)]
Rename fcmovae to fcmovnb and fcmova to fcmovnbe (following Intel manual).
Some assemblers can't recognize the aliases.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25494 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agoDo some code refactoring on Jim's scheduler in preparation of the new list
Evan Cheng [Sat, 21 Jan 2006 02:32:06 +0000 (02:32 +0000)]
Do some code refactoring on Jim's scheduler in preparation of the new list
scheduler.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25493 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agotrivial formatting improvement: don't insert extra blank lines between .comm
Chris Lattner [Sat, 21 Jan 2006 01:35:26 +0000 (01:35 +0000)]
trivial formatting improvement: don't insert extra blank lines between .comm
vars.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25492 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agoSimplify search for abbreviations.
Jim Laskey [Sat, 21 Jan 2006 01:13:18 +0000 (01:13 +0000)]
Simplify search for abbreviations.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25491 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agoCorrect some simple errors.
Jim Laskey [Sat, 21 Jan 2006 00:59:54 +0000 (00:59 +0000)]
Correct some simple errors.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25490 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agoRight size integer values before emitting.
Jim Laskey [Fri, 20 Jan 2006 21:02:36 +0000 (21:02 +0000)]
Right size integer values before emitting.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25489 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agoMake the C writer work with packed types. printContainedStructs is
Robert Bocchino [Fri, 20 Jan 2006 20:43:57 +0000 (20:43 +0000)]
Make the C writer work with packed types.  printContainedStructs is
still not quite right and will be fixed later.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25488 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agoReworked how Dwarf debug info entries and abbreviations are handled. Added
Jim Laskey [Fri, 20 Jan 2006 20:34:06 +0000 (20:34 +0000)]
Reworked how Dwarf debug info entries and abbreviations are handled.  Added
pubnames and debuy str sections.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25487 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agoremove RET hack, add proper support for rets (watching out for ret voids)
Duraid Madina [Fri, 20 Jan 2006 20:24:31 +0000 (20:24 +0000)]
remove RET hack, add proper support for rets (watching out for ret voids)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25486 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agoSimplify CWriter::printContainedStructs, also allowing it to work with
Chris Lattner [Fri, 20 Jan 2006 18:57:03 +0000 (18:57 +0000)]
Simplify CWriter::printContainedStructs, also allowing it to work with
PackedTypes as a side-effect.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25485 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agoLowerReturn now doesn't have to handle f32 returns.
Chris Lattner [Fri, 20 Jan 2006 18:41:25 +0000 (18:41 +0000)]
LowerReturn now doesn't have to handle f32 returns.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25484 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agoremove some unintentionally committed code
Chris Lattner [Fri, 20 Jan 2006 18:40:10 +0000 (18:40 +0000)]
remove some unintentionally committed code

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25483 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agoIf the target doesn't support f32 natively, insert the FP_EXTEND in target-indep
Chris Lattner [Fri, 20 Jan 2006 18:38:32 +0000 (18:38 +0000)]
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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25482 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agoFixed InitializeMemory to handle ConstantPacked.
Robert Bocchino [Fri, 20 Jan 2006 18:18:40 +0000 (18:18 +0000)]
Fixed InitializeMemory to handle ConstantPacked.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25481 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agoRemove dead expression.
Chris Lattner [Fri, 20 Jan 2006 18:04:43 +0000 (18:04 +0000)]
Remove dead expression.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25480 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agoDon't use invalidated use_iterator's. This fixes a crash compiling povray
Chris Lattner [Fri, 20 Jan 2006 18:01:41 +0000 (18:01 +0000)]
Don't use invalidated use_iterator's.  This fixes a crash compiling povray

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25479 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agofix sext breakage: now we correctly deal with functions that return
Duraid Madina [Fri, 20 Jan 2006 16:10:05 +0000 (16:10 +0000)]
fix sext breakage: now we correctly deal with functions that return
int vs uint

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25478 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agoUpdate Windows version of config.h to note availability of floor/floorf/ceil/ceilf.
Jeff Cohen [Fri, 20 Jan 2006 04:34:45 +0000 (04:34 +0000)]
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).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25477 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agofix storing bools! eek!
Duraid Madina [Fri, 20 Jan 2006 03:40:25 +0000 (03:40 +0000)]
fix storing bools! eek!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25476 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agoAdd a test case for PR697, ensuring the linker works with ConstantPacked.
Reid Spencer [Fri, 20 Jan 2006 01:31:58 +0000 (01:31 +0000)]
Add a test case for PR697, ensuring the linker works with ConstantPacked.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25475 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agoStop doing that accidental commit.
Evan Cheng [Fri, 20 Jan 2006 01:14:05 +0000 (01:14 +0000)]
Stop doing that accidental commit.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25474 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agoA few more SH{L|R}D peepholes.
Evan Cheng [Fri, 20 Jan 2006 01:13:30 +0000 (01:13 +0000)]
A few more SH{L|R}D peepholes.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25473 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agoAdded a load folding bug test case.
Evan Cheng [Fri, 20 Jan 2006 01:12:23 +0000 (01:12 +0000)]
Added a load folding bug test case.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25472 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agoPrevent folding of a node with multiple uses if the node already folds a load!
Evan Cheng [Fri, 20 Jan 2006 01:11:03 +0000 (01:11 +0000)]
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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25471 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agoConstantFoldLoadThroughGEPConstantExpr wasn't handling pointers to
Robert Bocchino [Thu, 19 Jan 2006 23:53:23 +0000 (23:53 +0000)]
ConstantFoldLoadThroughGEPConstantExpr wasn't handling pointers to
packed types correctly.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25470 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agoDidn't mean to commit the last one.
Evan Cheng [Thu, 19 Jan 2006 23:27:08 +0000 (23:27 +0000)]
Didn't mean to commit the last one.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25469 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agoAdded i16 SH{L|R}D patterns.
Evan Cheng [Thu, 19 Jan 2006 23:26:24 +0000 (23:26 +0000)]
Added i16 SH{L|R}D patterns.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25468 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agoadd support for ConstantPacked to the linker
Chris Lattner [Thu, 19 Jan 2006 23:15:58 +0000 (23:15 +0000)]
add support for ConstantPacked to the linker

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25467 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agoDon't include generated lexer .cpp files.
Chris Lattner [Thu, 19 Jan 2006 22:01:51 +0000 (22:01 +0000)]
Don't include generated lexer .cpp files.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25466 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agoBug fix. Flag operand number may be calculated incorrectly.
Evan Cheng [Thu, 19 Jan 2006 21:57:10 +0000 (21:57 +0000)]
Bug fix. Flag operand number may be calculated incorrectly.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25465 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agotypo
Andrew Lenharth [Thu, 19 Jan 2006 21:10:38 +0000 (21:10 +0000)]
typo

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25464 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agonasty nasty patterns
Andrew Lenharth [Thu, 19 Jan 2006 20:49:37 +0000 (20:49 +0000)]
nasty nasty patterns

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25463 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agofix boolean XOR (which fixes up comparisons..)
Duraid Madina [Thu, 19 Jan 2006 15:18:56 +0000 (15:18 +0000)]
fix boolean XOR (which fixes up comparisons..)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25462 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agoBOOM!
Duraid Madina [Thu, 19 Jan 2006 14:14:11 +0000 (14:14 +0000)]
BOOM!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25460 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agoclick click
Duraid Madina [Thu, 19 Jan 2006 14:13:11 +0000 (14:13 +0000)]
click click

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25459 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agoUse pattern information to determine whether the use expects this
Evan Cheng [Thu, 19 Jan 2006 10:12:58 +0000 (10:12 +0000)]
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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25458 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agoAvoid generating a redundant setcc.
Evan Cheng [Thu, 19 Jan 2006 08:52:46 +0000 (08:52 +0000)]
Avoid generating a redundant setcc.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25457 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agoFor PR696:
Reid Spencer [Thu, 19 Jan 2006 08:36:56 +0000 (08:36 +0000)]
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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25456 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agofix calls that return f32
Duraid Madina [Thu, 19 Jan 2006 08:31:51 +0000 (08:31 +0000)]
fix calls that return f32

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25455 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agoMake sure that libm is used during config tests so that ceil, floor, and
Reid Spencer [Thu, 19 Jan 2006 08:31:08 +0000 (08:31 +0000)]
Make sure that libm is used during config tests so that ceil, floor, and
friends are actually detected.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25454 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agoFor PR696:
Reid Spencer [Thu, 19 Jan 2006 08:22:40 +0000 (08:22 +0000)]
For PR696:
Add checks for ceil, ceilf, floor, and floorf

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25453 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agoImplement casts.ll:test26: a cast from float -> double -> integer, doesn't
Chris Lattner [Thu, 19 Jan 2006 07:40:22 +0000 (07:40 +0000)]
Implement casts.ll:test26: a cast from float -> double -> integer, doesn't
need the float->double part.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25452 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agoAdd a new testcase for an eliminable cast
Chris Lattner [Thu, 19 Jan 2006 07:39:20 +0000 (07:39 +0000)]
Add a new testcase for an eliminable cast

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25451 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agoimplement support for f32 arguments past the first 6 words
Chris Lattner [Thu, 19 Jan 2006 07:22:29 +0000 (07:22 +0000)]
implement support for f32 arguments past the first 6 words

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25450 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agoThis test passes now.
Reid Spencer [Thu, 19 Jan 2006 07:15:47 +0000 (07:15 +0000)]
This test passes now.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25449 91177308-0d34-0410-b5e6-96231b3b80d8

18 years ago1. Identify bytecode modules that have upgraded intrinsics by setting a
Reid Spencer [Thu, 19 Jan 2006 07:02:16 +0000 (07:02 +0000)]
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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25448 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agoDon't forget about casting the result of an upgraded call to an intrinsic
Reid Spencer [Thu, 19 Jan 2006 07:00:29 +0000 (07:00 +0000)]
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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25447 91177308-0d34-0410-b5e6-96231b3b80d8

18 years ago1. Documentation upgrade.
Reid Spencer [Thu, 19 Jan 2006 06:59:26 +0000 (06:59 +0000)]
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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25446 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agoAdd a flag to identify bytecode files that have intrinsic functions that
Reid Spencer [Thu, 19 Jan 2006 06:57:58 +0000 (06:57 +0000)]
Add a flag to identify bytecode files that have intrinsic functions that
need to be upgraded.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25445 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agoadc and sbb need an incoming flag to ensure it reads the carry flag
Evan Cheng [Thu, 19 Jan 2006 06:53:20 +0000 (06:53 +0000)]
adc and sbb need an incoming flag to ensure it reads the carry flag
from add / sub.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25444 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agomake this work for Reid, who renamed his CVS module dir :)
Chris Lattner [Thu, 19 Jan 2006 06:49:46 +0000 (06:49 +0000)]
make this work for Reid, who renamed his CVS module dir :)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25443 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agonew testcase the autoupgrader in the bc reader fails to handle
Chris Lattner [Thu, 19 Jan 2006 06:15:34 +0000 (06:15 +0000)]
new testcase the autoupgrader in the bc reader fails to handle

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25442 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agoMake get_suffix faster by using a switch on getTypeID rather than a series
Reid Spencer [Thu, 19 Jan 2006 05:37:27 +0000 (05:37 +0000)]
Make get_suffix faster by using a switch on getTypeID rather than a series
of comparisons on the various type objects.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25441 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agoAnother typo
Evan Cheng [Thu, 19 Jan 2006 04:54:52 +0000 (04:54 +0000)]
Another typo

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25440 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agoadd a note
Chris Lattner [Thu, 19 Jan 2006 02:09:38 +0000 (02:09 +0000)]
add a note

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25439 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agoTwo peepholes:
Evan Cheng [Thu, 19 Jan 2006 01:56:29 +0000 (01:56 +0000)]
Two peepholes:
(or (x >> c) | (y << (32 - c))) ==> (shrd x, y, c)
(or (x << c) | (y >> (32 - c))) ==> (shld x, y, c)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25438 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agoPrevent unnecessary CopyToReg when the same HW register appears in two spots
Evan Cheng [Thu, 19 Jan 2006 01:55:45 +0000 (01:55 +0000)]
Prevent unnecessary CopyToReg when the same HW register appears in two spots
in the pattern.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25437 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agoDidn't mean to check that in.
Evan Cheng [Thu, 19 Jan 2006 01:52:56 +0000 (01:52 +0000)]
Didn't mean to check that in.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25436 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agoA obvious typo
Evan Cheng [Thu, 19 Jan 2006 01:46:14 +0000 (01:46 +0000)]
A obvious typo

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25435 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agoMake sure intrinsic auto-upgrade is invoked correctly.
Reid Spencer [Thu, 19 Jan 2006 01:21:04 +0000 (01:21 +0000)]
Make sure intrinsic auto-upgrade is invoked correctly.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25434 91177308-0d34-0410-b5e6-96231b3b80d8