Commit Graph

20107 Commits

Author SHA1 Message Date
Chris Lattner 7f1fa8eaef implement the other half of the select_cc -> fsel lowering, which handles
when the RHS of the comparison is 0.0.  Turn this on by default.

llvm-svn: 23083
2005-08-26 17:36:52 +00:00
Chris Lattner d0dc6f4299 Fix a bug in my previous checkin
llvm-svn: 23082
2005-08-26 17:18:44 +00:00
Chris Lattner c30405e0ee Change ConstantPoolSDNode to actually hold the Constant itself instead of
putting it into the constant pool.  This allows the isel machinery to
create constants that it will end up deciding are not needed, without them
ending up in the resultant function constant pool.

llvm-svn: 23081
2005-08-26 17:15:30 +00:00
Chris Lattner 7bbdae53d6 Fix some warnings in an optimized build
llvm-svn: 23080
2005-08-26 16:38:51 +00:00
Chris Lattner 2091a36631 Fix a huge annoyance: SelectNodeTo took types before the opcode unlike
every other SD API.  Fix it to take the opcode before the types.

llvm-svn: 23079
2005-08-26 16:36:26 +00:00
Jim Laskey d6281ce4fe Changed unsigned long to unsigned.
llvm-svn: 23078
2005-08-26 09:25:54 +00:00
Jim Laskey 6e07862be6 Change unsigned lng to unsigned.
llvm-svn: 23077
2005-08-26 09:24:46 +00:00
Nate Begeman 7b809f593b Fix JIT encoding of conditional branches
llvm-svn: 23076
2005-08-26 04:11:42 +00:00
Chris Lattner f3d06c6417 add initial support for converting select_cc -> fsel in the legalizer
instead of in the backend.  This currently handles fsel cases with registers,
but doesn't have the 0.0 and -0.0 optimization enabled yet.

Once this is finished, special hack for fp immediates can go away.

llvm-svn: 23075
2005-08-26 00:52:45 +00:00
Chris Lattner c6d481db7a the 5th operand is the 4th number
llvm-svn: 23074
2005-08-26 00:43:46 +00:00
Nate Begeman 89093ca62a SUBFIC produces two results, not one.
llvm-svn: 23073
2005-08-26 00:34:06 +00:00
Nate Begeman bed4f2b982 Implement SHL_PARTS and SRL_PARTS
llvm-svn: 23072
2005-08-26 00:28:00 +00:00
Chris Lattner 5f573416cd Add support for targets that want to custom expand select_cc in some cases.
llvm-svn: 23071
2005-08-26 00:23:59 +00:00
Chris Lattner dff50cadaa Allow LowerOperation to return a null SDOperand in case it wants to lower
some things given to it, but not all.

llvm-svn: 23070
2005-08-26 00:14:16 +00:00
Chris Lattner 1cb550c603 Fix a nasty bug from a previous patch of mine
llvm-svn: 23069
2005-08-26 00:13:12 +00:00
Chris Lattner b81431b012 Emit the lo/hi parts in the right order :)
llvm-svn: 23068
2005-08-25 23:36:49 +00:00
Jim Laskey fb855ee072 Added cl::bits option type (bit vectors). See "Collecting options as a set
of flags" in the Command Line doc.

llvm-svn: 23067
2005-08-25 23:31:45 +00:00
Chris Lattner 02884fe41c implement support for 64-bit add/sub, fix a broken assertion for 64-bit
return.  Allow the udiv breaker-upper to work with any non-zero constant
operand.

llvm-svn: 23066
2005-08-25 23:21:06 +00:00
Chris Lattner abbd8ea048 simplify the add/sub_parts code
llvm-svn: 23065
2005-08-25 23:19:58 +00:00
Jim Laskey a82d08f8ba Tweak of multiple occurance paragraph.
llvm-svn: 23064
2005-08-25 23:01:25 +00:00
Jim Laskey 295810d53f Documentation updated to include upcoming support for bit vector support
(flags.)

llvm-svn: 23063
2005-08-25 22:52:43 +00:00
Chris Lattner 6e184f2b3d Finish implementing SDIV/UDIV by copying over the majik constant code from
ISelPattern

llvm-svn: 23062
2005-08-25 22:04:30 +00:00
Chris Lattner 717f97a5c8 Simplify some code. It's not clear why the UDIV expanded sequence
doesn't work for large uint constants, but we'll keep the current behavior

llvm-svn: 23061
2005-08-25 22:03:50 +00:00
Chris Lattner b746dd1cf6 Implement setcc correctly for G5 and non-G5 systems
llvm-svn: 23060
2005-08-25 21:39:42 +00:00
Chris Lattner 3dcd75bc54 implement setcc on the G5. We're still missing the non-g5 specific bits, but
they will come later.

llvm-svn: 23059
2005-08-25 20:08:18 +00:00
Nate Begeman 33840c3268 New fold for SELECT_CC
llvm-svn: 23058
2005-08-25 20:04:38 +00:00
Nate Begeman 65ffd8fbf4 Remove option to make SetCC illegal on PowerPC after long discussion with
Chris.  This will be accomplished through correctly modeling CR's and
subregs.

llvm-svn: 23056
2005-08-25 20:01:10 +00:00
Chris Lattner f9c19157df Don't auto-cse nodes that return flags
llvm-svn: 23055
2005-08-25 19:12:10 +00:00
Chris Lattner 12756be53b add printer support for flag operands
llvm-svn: 23054
2005-08-25 17:59:23 +00:00
Chris Lattner 9d28a56d55 simplify the code a bit using isOperationLegal
llvm-svn: 23053
2005-08-25 17:54:58 +00:00
Chris Lattner dc66457022 Add support for sdiv by 2^k and -2^k. Producing code like:
_test:
        srawi r2, r3, 2
        addze r3, r2
        blr

llvm-svn: 23052
2005-08-25 17:50:06 +00:00
Chris Lattner 4bd2aab6c1 fit in 80 cols
llvm-svn: 23051
2005-08-25 17:49:31 +00:00
Chris Lattner 8a93f64efa Add support for flag operands
llvm-svn: 23050
2005-08-25 17:48:54 +00:00
Chris Lattner 5ac0805b5e add a method
llvm-svn: 23049
2005-08-25 17:24:09 +00:00
Chris Lattner d24ad52efa add an enum value
llvm-svn: 23048
2005-08-25 17:07:09 +00:00
Jim Laskey 7da6420a23 Remove Support/Search.h entry
llvm-svn: 23047
2005-08-25 16:44:13 +00:00
Jim Laskey 9fda3a799c Recommended to use std::algorithms instead.
llvm-svn: 23046
2005-08-25 16:21:56 +00:00
Jim Laskey 807c3460d7 Added Support/Search.h to project.
llvm-svn: 23045
2005-08-25 13:42:04 +00:00
Jim Laskey aabf3e2bf1 Added support for generic linear/binary search.
llvm-svn: 23044
2005-08-25 13:32:25 +00:00
Chris Lattner 1db9de30ea Fix a problem Duraid noticed, where we weren't removing values from the kills
list when doing two-address and phi node lowering during register allocation.

llvm-svn: 23043
2005-08-25 05:45:31 +00:00
Chris Lattner 25db699671 Implement support for taking the address of constant pool indices, which
is used by the int -> FP code among other things.  This gets
2005-05-12-Int64ToFP past that failure, to dying on lack of support for add_parts

llvm-svn: 23042
2005-08-25 05:04:11 +00:00
Chris Lattner 407c6415b4 ADd support for TargetConstantPool nodes
llvm-svn: 23041
2005-08-25 05:03:06 +00:00
Chris Lattner 79b8dad7ea Add support for TargetConstantPool node
llvm-svn: 23040
2005-08-25 05:02:41 +00:00
Reid Spencer 53846bcdb6 For PR614:
Move the implementation of the fix from Makefile.rules to Makefile. This
ensures that it is only checked on a top-level rebuild, and not in every
single subdirectory. This removes some annoying messages from the build and
numerous executions of config.status if the .in file changes but not
substantively enough to cause the .h file to be modified by config.status.

llvm-svn: 23039
2005-08-25 04:59:49 +00:00
Chris Lattner 666512c832 Add support for FP constants, fixing UnitTests/2004-02-02-NegativeZero
llvm-svn: 23038
2005-08-25 04:47:18 +00:00
Reid Spencer 83bde55c64 Don't attempt to update LLVM configured header files from a build in a
project. Thanks to Chris for pointing out this deficiency.

llvm-svn: 23037
2005-08-25 04:44:18 +00:00
Chris Lattner e4c338d0d8 Fully implement frame index, so that we can pass the address of alloca's
around to functions and stuff

llvm-svn: 23036
2005-08-25 00:45:43 +00:00
Chris Lattner bbe0e7df2c add a new TargetFrameIndex node
llvm-svn: 23035
2005-08-25 00:43:01 +00:00
Chris Lattner 66a6a13225 implement unconditional branches, fixing UnitTests/2003-05-02-DependentPHI.c
llvm-svn: 23034
2005-08-25 00:29:58 +00:00
Chris Lattner 4ae278a760 LFS/STFS load and store FP values, not integer ones. This change allows us
to codegen this: float foo() { return 1.245; }

into this:

_foo:
        lis r2, ha16(.CPI_foo_0)
        lfs f1, lo16(.CPI_foo_0)(r2)
        blr

instead of this:

_foo:
        lis r2, ha16(.CPI_foo_0)
        lfs r2, lo16(.CPI_foo_0)(r2)   <-- ouch
        or f1, r2, r2                  <-- ouch
        blr

with the dag isel.

llvm-svn: 23033
2005-08-25 00:26:22 +00:00