oota-llvm.git
19 years agoImplement the following xforms:
Chris Lattner [Thu, 7 Apr 2005 17:14:51 +0000 (17:14 +0000)]
Implement the following xforms:
(X-Y)-X --> -Y
A + (B - A) --> B
(B - A) + A --> B

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

19 years agonew test
Chris Lattner [Thu, 7 Apr 2005 16:41:45 +0000 (16:41 +0000)]
new test

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

19 years agoImplement InstCombine/add.ll:test28, transforming C1-(X+C2) --> (C1-C2)-X.
Chris Lattner [Thu, 7 Apr 2005 16:28:01 +0000 (16:28 +0000)]
Implement InstCombine/add.ll:test28, transforming C1-(X+C2) --> (C1-C2)-X.
This occurs several dozen times in specint2k, particularly in crafty and gcc
apparently.

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

19 years agonew testcase
Chris Lattner [Thu, 7 Apr 2005 16:24:59 +0000 (16:24 +0000)]
new testcase

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

19 years agoTransform X-(X+Y) == -Y and X-(Y+X) == -Y
Chris Lattner [Thu, 7 Apr 2005 16:15:25 +0000 (16:15 +0000)]
Transform X-(X+Y) == -Y and X-(Y+X) == -Y

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

19 years agoIt wasn't happy about this either
Andrew Lenharth [Thu, 7 Apr 2005 14:18:13 +0000 (14:18 +0000)]
It wasn't happy about this either

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

19 years agoYea, it wasn't happy
Andrew Lenharth [Thu, 7 Apr 2005 13:55:53 +0000 (13:55 +0000)]
Yea, it wasn't happy

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

19 years agoteach asmprinter to print s8/s14 operands
Duraid Madina [Thu, 7 Apr 2005 12:34:36 +0000 (12:34 +0000)]
teach asmprinter to print s8/s14 operands

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

19 years agocodegen immediate forms of add/sub/shift
Duraid Madina [Thu, 7 Apr 2005 12:33:38 +0000 (12:33 +0000)]
codegen immediate forms of add/sub/shift

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

19 years agoadd immediate forms of add, sub, shift
Duraid Madina [Thu, 7 Apr 2005 12:32:24 +0000 (12:32 +0000)]
add immediate forms of add, sub, shift

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

19 years agoFix a really scary bug that Nate found where we weren't deleting the right
Chris Lattner [Thu, 7 Apr 2005 00:30:13 +0000 (00:30 +0000)]
Fix a really scary bug that Nate found where we weren't deleting the right
elements auto of the autoCSE maps.

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

19 years agoPattern match bitfield insert, which helps shift long by immediate, among
Nate Begeman [Wed, 6 Apr 2005 23:51:40 +0000 (23:51 +0000)]
Pattern match bitfield insert, which helps shift long by immediate, among
other things.

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

19 years agoFix some shift bugs
Nate Begeman [Wed, 6 Apr 2005 22:42:08 +0000 (22:42 +0000)]
Fix some shift bugs

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

19 years agoMake these 64 bit constants so that this compiles on x86-32 as well.
Alkis Evlogimenos [Wed, 6 Apr 2005 22:09:40 +0000 (22:09 +0000)]
Make these 64 bit constants so that this compiles on x86-32 as well.

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

19 years agoadded sdiv by 2^k and works for neg divisors also
Andrew Lenharth [Wed, 6 Apr 2005 22:03:13 +0000 (22:03 +0000)]
added sdiv by 2^k and works for neg divisors also

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

19 years agoDon't make this require loopsimplify. It works BETTER with loop simplify
Chris Lattner [Wed, 6 Apr 2005 21:45:00 +0000 (21:45 +0000)]
Don't make this require loopsimplify.  It works BETTER with loop simplify
but should not require it.

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

19 years agoTeach ExpandShift how to handle shifts by a constant. This allows targets
Nate Begeman [Wed, 6 Apr 2005 21:13:14 +0000 (21:13 +0000)]
Teach ExpandShift how to handle shifts by a constant.  This allows targets
like PowerPC to codegen long shifts in many fewer instructions.

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

19 years agofix copy/paste errors, and add imm support to SxADDQ and SxSUBQ
Andrew Lenharth [Wed, 6 Apr 2005 20:59:59 +0000 (20:59 +0000)]
fix copy/paste errors, and add imm support to SxADDQ and SxSUBQ

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

19 years agoFix SingleSource/Regression/C/2005-05-06-LongLongSignedShift.c, we were not
Chris Lattner [Wed, 6 Apr 2005 20:59:35 +0000 (20:59 +0000)]
Fix SingleSource/Regression/C/2005-05-06-LongLongSignedShift.c, we were not
properly sign extending the top of the result of a 64-bit shift right by
a constant > 32.

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

19 years agosimplified
Andrew Lenharth [Wed, 6 Apr 2005 20:59:03 +0000 (20:59 +0000)]
simplified

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

19 years agoadded first alpha codegen regression test
Andrew Lenharth [Wed, 6 Apr 2005 20:39:17 +0000 (20:39 +0000)]
added first alpha codegen regression test

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

19 years agoAdded Nate's div by constant stuff, also scaled operations!
Andrew Lenharth [Wed, 6 Apr 2005 20:25:34 +0000 (20:25 +0000)]
Added Nate's div by constant stuff, also scaled operations!

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

19 years agoFix a namespace issue, reported by Vladimir Merzliakov!
Chris Lattner [Wed, 6 Apr 2005 19:45:39 +0000 (19:45 +0000)]
Fix a namespace issue, reported by Vladimir Merzliakov!

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

19 years agosteal sampo's div-by-constant-power-of-2 stuff
Duraid Madina [Wed, 6 Apr 2005 09:55:17 +0000 (09:55 +0000)]
steal sampo's div-by-constant-power-of-2 stuff
thanks sampo!!

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

19 years agoadd fms instruction
Duraid Madina [Wed, 6 Apr 2005 09:54:09 +0000 (09:54 +0000)]
add fms instruction

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

19 years agoFixed version of optimized integer divide is now fixed. Calculate the
Nate Begeman [Wed, 6 Apr 2005 06:44:57 +0000 (06:44 +0000)]
Fixed version of optimized integer divide is now fixed.  Calculate the
quotient, not the remainder.  Also, make sure to remove the old div operand
from the ExprMap and let SelectExpr insert the new one.

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

19 years agolie a bit and say that r1/r12 (GP/SP) _aren't_ callee-save, as we take
Duraid Madina [Wed, 6 Apr 2005 06:18:36 +0000 (06:18 +0000)]
lie a bit and say that r1/r12 (GP/SP) _aren't_ callee-save, as we take
care of this ourselves

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

19 years agomake sure 'special' registers don't get allocated
Duraid Madina [Wed, 6 Apr 2005 06:17:54 +0000 (06:17 +0000)]
make sure 'special' registers don't get allocated

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

19 years agodocument these nodes, as they are nonobvious
Chris Lattner [Wed, 6 Apr 2005 04:21:29 +0000 (04:21 +0000)]
document these nodes, as they are nonobvious

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

19 years agoAdd (untested) support for MULHS and MULHU.
Chris Lattner [Wed, 6 Apr 2005 04:21:07 +0000 (04:21 +0000)]
Add (untested) support for MULHS and MULHU.

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

19 years agoadd signed versions of the extra precision multiplies
Chris Lattner [Wed, 6 Apr 2005 04:19:22 +0000 (04:19 +0000)]
add signed versions of the extra precision multiplies

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

19 years agoTurn off the div -> mul optimization until it works correctly 100% of the
Nate Begeman [Wed, 6 Apr 2005 03:36:33 +0000 (03:36 +0000)]
Turn off the div -> mul optimization until it works correctly 100% of the
time.

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

19 years agoAdd support for MULHS and MULHU nodes
Nate Begeman [Wed, 6 Apr 2005 00:25:27 +0000 (00:25 +0000)]
Add support for MULHS and MULHU nodes
Have LegalizeDAG handle SREM and UREM for us
Codegen SDIV and UDIV by constant as a multiply by magic constant instead
of integer divide, which is very slow.

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

19 years agoExpand SREM and UREM for targets that claim not to have them, like PowerPC
Nate Begeman [Wed, 6 Apr 2005 00:23:54 +0000 (00:23 +0000)]
Expand SREM and UREM for targets that claim not to have them, like PowerPC

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

19 years agoAdd MULHU and MULHS nodes for the high part of an (un)signed 32x32=64b
Nate Begeman [Tue, 5 Apr 2005 22:36:56 +0000 (22:36 +0000)]
Add MULHU and MULHS nodes for the high part of an (un)signed 32x32=64b
multiply.

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

19 years agoadded lowerargs support for varargs
Andrew Lenharth [Tue, 5 Apr 2005 20:51:46 +0000 (20:51 +0000)]
added lowerargs support for varargs

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

19 years agoBehold, rlwinm with certain immediate arguments is printed as the much more
Nate Begeman [Tue, 5 Apr 2005 18:19:50 +0000 (18:19 +0000)]
Behold, rlwinm with certain immediate arguments is printed as the much more
readable slwi or srwi (shift left/right word immediate).

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

19 years agoFix cut & paste errors (32->64), and codegen float->int more optimally.
Nate Begeman [Tue, 5 Apr 2005 17:32:30 +0000 (17:32 +0000)]
Fix cut & paste errors (32->64), and codegen float->int more optimally.

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

19 years agoUpdated to use dep analyzer.
Tanya Lattner [Tue, 5 Apr 2005 16:36:44 +0000 (16:36 +0000)]
Updated to use dep analyzer.

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

19 years agoRemove 64 bit simple ISel, it never worked correctly
Nate Begeman [Tue, 5 Apr 2005 08:51:15 +0000 (08:51 +0000)]
Remove 64 bit simple ISel, it never worked correctly
Add initial (buggy) implementation of 64 bit pattern ISel

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

19 years agoBack out the previous change to SelectBranchCC, since there are cases it
Nate Begeman [Tue, 5 Apr 2005 04:32:16 +0000 (04:32 +0000)]
Back out the previous change to SelectBranchCC, since there are cases it
could miscompile.  A correct solution will be found in the near future.

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

19 years agoRename canUseAsImmediateForOpcode to getImmediateForOpcode to better
Nate Begeman [Tue, 5 Apr 2005 04:22:58 +0000 (04:22 +0000)]
Rename canUseAsImmediateForOpcode to getImmediateForOpcode to better
  indicate that it is not a boolean function.
Properly emit the pseudo instruction for conditional branch, so that we
  can fix up conditional branches whose displacements are too large.
Reserve the right amount of opcode space for said pseudo instructions.

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

19 years agodo not crash when using -debug
Chris Lattner [Tue, 5 Apr 2005 01:12:03 +0000 (01:12 +0000)]
do not crash when using -debug

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

19 years agoImplement SDIV by power of 2 as srawi/addze rather than load imm, divw
Nate Begeman [Tue, 5 Apr 2005 00:15:08 +0000 (00:15 +0000)]
Implement SDIV by power of 2 as srawi/addze rather than load imm, divw

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

19 years agoPattern match fp mul-add, mul-sub, neg-mul-add, and neg-mul-sub
Nate Begeman [Mon, 4 Apr 2005 23:40:36 +0000 (23:40 +0000)]
Pattern match fp mul-add, mul-sub, neg-mul-add, and neg-mul-sub

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

19 years agoAdd support for multiply-add, multiply-sub, and their negated versions
Nate Begeman [Mon, 4 Apr 2005 23:01:51 +0000 (23:01 +0000)]
Add support for multiply-add, multiply-sub, and their negated versions

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

19 years agodo not dereference an extra layer of pointers to determine if an external
Chris Lattner [Mon, 4 Apr 2005 22:23:21 +0000 (22:23 +0000)]
do not dereference an extra layer of pointers to determine if an external
call can modify a memory location.  This fixes
test/Regression/Analysis/Andersens/modreftest.ll

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

19 years agonew testcase
Chris Lattner [Mon, 4 Apr 2005 22:22:30 +0000 (22:22 +0000)]
new testcase

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

19 years agoMake sure that arg regs used by the call instruction are marked as such, so
Nate Begeman [Mon, 4 Apr 2005 22:17:48 +0000 (22:17 +0000)]
Make sure that arg regs used by the call instruction are marked as such, so
that regalloc doesn't cleverly reuse early arg regs loading later arg regs.
This fixes almost all outstanding failures in the pattern isel.

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

19 years agoRemove unnecessary register copy now that regalloc is fixed
Nate Begeman [Mon, 4 Apr 2005 21:48:13 +0000 (21:48 +0000)]
Remove unnecessary register copy now that regalloc is fixed

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

19 years agoMake sure to notice that explicit physregs are used in the function
Chris Lattner [Mon, 4 Apr 2005 21:35:34 +0000 (21:35 +0000)]
Make sure to notice that explicit physregs are used in the function

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

19 years agoi1 loads should also be from the low byte of the argument word.
Nate Begeman [Mon, 4 Apr 2005 09:09:00 +0000 (09:09 +0000)]
i1 loads should also be from the low byte of the argument word.

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

19 years agoFix i64 return, fix CopyFromReg
Nate Begeman [Mon, 4 Apr 2005 06:52:38 +0000 (06:52 +0000)]
Fix i64 return, fix CopyFromReg

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

19 years agofix SREM/UREM, which gave incorrect results for x%y if x was zero. This is
Duraid Madina [Mon, 4 Apr 2005 05:05:52 +0000 (05:05 +0000)]
fix SREM/UREM, which gave incorrect results for x%y if x was zero. This is
an ugly hack, but it seems to work. I should fix this properly and add a test
as well.

fixes multisource/obsequi (maybe others)

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

19 years agoadd implicit use op
Duraid Madina [Mon, 4 Apr 2005 04:50:57 +0000 (04:50 +0000)]
add implicit use op

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

19 years agoHandle expanding arguments to ISD::TRUNCATE. This happens on PowerPC when
Nate Begeman [Mon, 4 Apr 2005 00:57:08 +0000 (00:57 +0000)]
Handle expanding arguments to ISD::TRUNCATE.  This happens on PowerPC when
you have something like i16 = truncate i64.  This fixes Regression/C/casts

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

19 years agoFix sign_extend and zero_extend of promoted value types to expanded value
Chris Lattner [Sun, 3 Apr 2005 23:41:52 +0000 (23:41 +0000)]
Fix sign_extend and zero_extend of promoted value types to expanded value
types.  This occurs when casting short to long on PPC for example.

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

19 years agoFull varargs support. All of UnitTests now passes
Nate Begeman [Sun, 3 Apr 2005 23:11:17 +0000 (23:11 +0000)]
Full varargs support.  All of UnitTests now passes

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

19 years agoPass the correct value for the chain to the store
Nate Begeman [Sun, 3 Apr 2005 22:22:56 +0000 (22:22 +0000)]
Pass the correct value for the chain to the store

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

19 years agoFix SHL_PARTS
Nate Begeman [Sun, 3 Apr 2005 22:13:27 +0000 (22:13 +0000)]
Fix SHL_PARTS
Start implementation of integer varargs

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

19 years agois this simpler? I think it is simpler.
Andrew Lenharth [Sun, 3 Apr 2005 20:35:21 +0000 (20:35 +0000)]
is this simpler?  I think it is simpler.

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

19 years agofix 101 regressions
Andrew Lenharth [Sun, 3 Apr 2005 18:24:50 +0000 (18:24 +0000)]
fix 101 regressions

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

19 years agoa wise man once said:
Duraid Madina [Sun, 3 Apr 2005 14:57:35 +0000 (14:57 +0000)]
a wise man once said:

"!!!!!!!! IF YOU CHANGE SPACES TO TABS, YOU WILL BE KILLED!!!!!!"

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

19 years ago.bss is no problem here.
Duraid Madina [Sun, 3 Apr 2005 14:52:01 +0000 (14:52 +0000)]
.bss is no problem here.

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

19 years agoKeeping up with the Joneses.
Nate Begeman [Sun, 3 Apr 2005 11:20:20 +0000 (11:20 +0000)]
Keeping up with the Joneses.
Implement not, nor, nand, and eqv

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

19 years agoSelect optimization
Andrew Lenharth [Sat, 2 Apr 2005 22:32:39 +0000 (22:32 +0000)]
Select optimization

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

19 years agoTry several things. 1) drop /i from FP ops 2) factor out FP to Int moves and provide...
Andrew Lenharth [Sat, 2 Apr 2005 21:06:51 +0000 (21:06 +0000)]
Try several things.  1) drop /i from FP ops 2) factor out FP to Int moves and provide 21264 support for those 3) match not 4) match ornot andnot xornot

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

19 years agofix some VC compilation problems, thanks to Jeff C for pointing this out!
Chris Lattner [Sat, 2 Apr 2005 20:17:09 +0000 (20:17 +0000)]
fix some VC compilation problems, thanks to Jeff C for pointing this out!

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

19 years agoEquivClassGraphs is now in DataStructure.h
Chris Lattner [Sat, 2 Apr 2005 20:08:17 +0000 (20:08 +0000)]
EquivClassGraphs is now in DataStructure.h

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

19 years agomerge EquivClassGraphs.h into DataStructure.h with the other DSA pass definitions.
Chris Lattner [Sat, 2 Apr 2005 20:08:06 +0000 (20:08 +0000)]
merge EquivClassGraphs.h into DataStructure.h with the other DSA pass definitions.

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

19 years agouse a callee_iterator typedef.
Chris Lattner [Sat, 2 Apr 2005 20:02:41 +0000 (20:02 +0000)]
use a callee_iterator typedef.

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

19 years agoadd and use a callee_iterator typedef
Chris Lattner [Sat, 2 Apr 2005 20:02:32 +0000 (20:02 +0000)]
add and use a callee_iterator typedef

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

19 years agoChange the ActualCallees callgraph from hash_multimap<Instruction,Function>
Chris Lattner [Sat, 2 Apr 2005 19:17:18 +0000 (19:17 +0000)]
Change the ActualCallees callgraph from hash_multimap<Instruction,Function>
to std::set<std::pair<Inst,Func>> to avoid duplicate entries.

This speeds up the CompleteBU pass from 1.99s to .15s on povray and the
eqgraph passes from 1.5s to .16s on the same.

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

19 years agoChange the ActualCallees callgraph from hash_multimap<Instruction,Function>
Chris Lattner [Sat, 2 Apr 2005 19:15:15 +0000 (19:15 +0000)]
Change the ActualCallees callgraph from hash_multimap<Instruction,Function>
to std::set<std::pair<Inst,Func>> to avoid duplicate entries.

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

19 years agoFNEG/FABS/UNDEF
Andrew Lenharth [Sat, 2 Apr 2005 19:11:07 +0000 (19:11 +0000)]
FNEG/FABS/UNDEF

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

19 years agoFNEG/FABS
Andrew Lenharth [Sat, 2 Apr 2005 19:04:58 +0000 (19:04 +0000)]
FNEG/FABS

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

19 years agothis has now been fixed
Chris Lattner [Sat, 2 Apr 2005 16:17:57 +0000 (16:17 +0000)]
this has now been fixed

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

19 years agoia64 asmprinter fixes:
Duraid Madina [Sat, 2 Apr 2005 12:30:47 +0000 (12:30 +0000)]
ia64 asmprinter fixes:
  - turn off assembler's autoalignment
  - set FunctionAddrPrefix/Suffix so that .data8 entries pointing to
    functions have their value wrapped in @fptr(), so that a function
    descriptor will be materialized for that function.

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

19 years agoadd support for prefix/suffix strings to go around GlobalValue(s)
Duraid Madina [Sat, 2 Apr 2005 12:21:51 +0000 (12:21 +0000)]
add support for prefix/suffix strings to go around GlobalValue(s)
(which may or be function pointers) in the asmprinter. For the moment,
this changes nothing, except the IA64 backend which can use this to write:

  data8.ua  @fptr(blah__blah__mangled_function_name)

  (by setting FunctionAddrPrefix/Suffix to "@fptr(" / ")")

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

19 years agosupport IDEF, fnegabs (thanks sampo)
Duraid Madina [Sat, 2 Apr 2005 10:33:53 +0000 (10:33 +0000)]
support IDEF, fnegabs (thanks sampo)

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

19 years agoadd fnegabs op
Duraid Madina [Sat, 2 Apr 2005 10:06:27 +0000 (10:06 +0000)]
add fnegabs op

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

19 years agoSet shift amount to Extend
Nate Begeman [Sat, 2 Apr 2005 05:59:34 +0000 (05:59 +0000)]
Set shift amount to Extend
Implement ISD::FABS and ISD::FNEG nodes
Implement SHL_PARTS, SRL_PARTS, and SRA_PARTS
Generate PowerPC 'fneg', 'fabs', and 'fnabs' instructions

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

19 years agodon't forget to use the right code generator :)
Chris Lattner [Sat, 2 Apr 2005 05:40:03 +0000 (05:40 +0000)]
don't forget to use the right code generator :)

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

19 years agonew testcase
Chris Lattner [Sat, 2 Apr 2005 05:35:00 +0000 (05:35 +0000)]
new testcase

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

19 years agoadd support for FABS and FNEG
Chris Lattner [Sat, 2 Apr 2005 05:30:17 +0000 (05:30 +0000)]
add support for FABS and FNEG

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

19 years agotransform fabs/fabsf calls into FABS nodes.
Chris Lattner [Sat, 2 Apr 2005 05:26:53 +0000 (05:26 +0000)]
transform fabs/fabsf calls into FABS nodes.

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

19 years agoExpand fabs into fneg
Chris Lattner [Sat, 2 Apr 2005 05:26:37 +0000 (05:26 +0000)]
Expand fabs into fneg

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

19 years agoadd support FNEG and FABS
Duraid Madina [Sat, 2 Apr 2005 05:18:38 +0000 (05:18 +0000)]
add support FNEG and FABS

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

19 years agoTurn -0.0 - X -> fneg
Chris Lattner [Sat, 2 Apr 2005 05:04:50 +0000 (05:04 +0000)]
Turn -0.0 - X -> fneg

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

19 years agoThis target doesn't support fabs/fneg yet.
Chris Lattner [Sat, 2 Apr 2005 05:03:24 +0000 (05:03 +0000)]
This target doesn't support fabs/fneg yet.

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

19 years agoSeveral changes mixed up here. First when legalizing a DAG with pcmarker,
Chris Lattner [Sat, 2 Apr 2005 05:00:07 +0000 (05:00 +0000)]
Several changes mixed up here.  First when legalizing a DAG with pcmarker,
dont' regen the whole dag if unneccesary.  Second, fix and ugly bug with
the _PARTS nodes that caused legalize to produce multiples of them.
Finally, implement initial support for FABS and FNEG.  Currently FNEG is
the only one to be trusted though.

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

19 years agoprint fneg/fabs
Chris Lattner [Sat, 2 Apr 2005 04:58:41 +0000 (04:58 +0000)]
print fneg/fabs

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

19 years agoAdd two happy new nodes for FABS and FNEG
Chris Lattner [Sat, 2 Apr 2005 04:58:28 +0000 (04:58 +0000)]
Add two happy new nodes for FABS and FNEG

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

19 years agoadd an fabs instr
Chris Lattner [Sat, 2 Apr 2005 04:31:56 +0000 (04:31 +0000)]
add an fabs instr

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

19 years agoAdd support for 64-bit shifts.
Chris Lattner [Sat, 2 Apr 2005 04:01:14 +0000 (04:01 +0000)]
Add support for 64-bit shifts.

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

19 years agofix some bugs in the implementation of SHL_PARTS and friends.
Chris Lattner [Sat, 2 Apr 2005 04:00:59 +0000 (04:00 +0000)]
fix some bugs in the implementation of SHL_PARTS and friends.

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

19 years agofix a comment
Chris Lattner [Sat, 2 Apr 2005 03:59:45 +0000 (03:59 +0000)]
fix a comment

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

19 years agoTurn expanded shift operations into (e.g.) SHL_PARTS if the target supports it.
Chris Lattner [Sat, 2 Apr 2005 03:38:53 +0000 (03:38 +0000)]
Turn expanded shift operations into (e.g.) SHL_PARTS if the target supports it.

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

19 years agoPrint some new nodes
Chris Lattner [Sat, 2 Apr 2005 03:30:42 +0000 (03:30 +0000)]
Print some new nodes

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

19 years agoadd some new nodes.
Chris Lattner [Sat, 2 Apr 2005 03:30:33 +0000 (03:30 +0000)]
add some new nodes.

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