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
Chris Lattner
794eb6684d
Fix a broken assertion
...
llvm-svn: 23032
2005-08-25 00:19:12 +00:00
Chris Lattner
c146940f0d
Fix a warning
...
llvm-svn: 23031
2005-08-25 00:05:15 +00:00
Chris Lattner
daae1e10f7
fix a warning in optimized build
...
llvm-svn: 23030
2005-08-25 00:03:21 +00:00
Chris Lattner
751c6c3944
Fix some warnings
...
llvm-svn: 23029
2005-08-25 00:00:26 +00:00
Chris Lattner
a3fbdae515
Split IMPLICIT_DEF into IMPLICIT_DEF_GPR and IMPLICIT_DEF_FP, so that the
...
instructions take a consistent reg class. Implement ISD::UNDEF in the dag->dag
selector to generate this, fixing UnitTests/2003-07-06-IntOverflow.
llvm-svn: 23028
2005-08-24 23:08:16 +00:00
Chris Lattner
45e1ce4e28
add a method
...
llvm-svn: 23027
2005-08-24 23:00:29 +00:00
Chris Lattner
d83cd354bd
implement support for calls
...
llvm-svn: 23026
2005-08-24 22:45:17 +00:00
Chris Lattner
d7ee4d8671
Add ReplaceAllUsesWith that can take a vector of replacement values.
...
Add some foldings to hopefully help the illegal setcc issue, and move some code around.
llvm-svn: 23025
2005-08-24 22:44:39 +00:00
Chris Lattner
9130192229
add two new methods
...
llvm-svn: 23024
2005-08-24 22:43:53 +00:00
Chris Lattner
1fc2a7f006
Remove some dead cases.
...
Emit the indcall sequence as:
mtctr inreg
mr R12, inreg
btctr
If inreg and R12 aren't coallesced, this reduces the odds of having the mtctr
and btctr in the same dispatch group. :)
llvm-svn: 23023
2005-08-24 22:21:47 +00:00
Chris Lattner
ad9565dfbe
Add support for external symbols, and support for variable arity instructions
...
llvm-svn: 23022
2005-08-24 22:02:41 +00:00
Chris Lattner
bb8cc0acb2
Fix pasto that prevented VT ndoes from showing up in -view-isel-dags correctly
...
llvm-svn: 23021
2005-08-24 18:30:00 +00:00
Chris Lattner
1e98a330f2
add an idea
...
llvm-svn: 23020
2005-08-24 18:15:24 +00:00
Chris Lattner
8ca5b2a6d2
Fix Regression/Transforms/Reassociate/2005-08-24-Crash.ll
...
llvm-svn: 23019
2005-08-24 17:55:32 +00:00
Chris Lattner
347f5cb985
new testcase that crashes -reassociate
...
llvm-svn: 23018
2005-08-24 17:54:56 +00:00
Chris Lattner
4201cd1bbc
Transform floor((double)FLT) -> (double)floorf(FLT), implementing
...
Regression/Transforms/SimplifyLibCalls/floor.ll. This triggers 19 times in
177.mesa.
llvm-svn: 23017
2005-08-24 17:22:17 +00:00
Chris Lattner
16a382df29
new testcase
...
llvm-svn: 23016
2005-08-24 17:20:30 +00:00
Chris Lattner
898e50ecb3
floor/ceil don't read/write memory. This allows gcse to eliminate 6 calls
...
in mesa.
llvm-svn: 23015
2005-08-24 16:58:56 +00:00
Chris Lattner
03e64f6c1e
Make sure this doesn't break when we're improving the isels
...
llvm-svn: 23014
2005-08-24 16:48:49 +00:00
Chris Lattner
86b1658d58
teach selection dag mask tracking about the fact that select_cc operates like
...
select. Also teach it that the bit count instructions can only set the low bits
of the result, depending on the size of the input.
This allows us to compile this:
int %eq0(int %a) {
%tmp.1 = seteq int %a, 0 ; <bool> [#uses=1]
%tmp.2 = cast bool %tmp.1 to int ; <int> [#uses=1]
ret int %tmp.2
}
To this:
_eq0:
cntlzw r2, r3
srwi r3, r2, 5
blr
instead of this:
_eq0:
cntlzw r2, r3
rlwinm r3, r2, 27, 31, 31
blr
when setcc is marked illegal on ppc (which restores parity to non-illegal
setcc). Thanks to Nate for pointing this out.
llvm-svn: 23013
2005-08-24 16:46:55 +00:00
Chris Lattner
f12eb4d676
Start using isOperationLegal and isTypeLegal to simplify the code
...
llvm-svn: 23012
2005-08-24 16:35:28 +00:00
Chris Lattner
5ff1bf4f0a
rename hasNativeSupportFor* -> is(Operation|Type)Legal.
...
llvm-svn: 23011
2005-08-24 16:34:59 +00:00
Chris Lattner
ade525491f
Adjust to new interface
...
llvm-svn: 23010
2005-08-24 16:34:12 +00:00
Misha Brukman
28a0d918c1
Wrap long lines
...
llvm-svn: 23009
2005-08-24 14:03:07 +00:00
Reid Spencer
87f95722b2
Remove some tabs.
...
Wrap a line.
llvm-svn: 23008
2005-08-24 10:57:30 +00:00