Chris Lattner
eda3f49562
Fix order of operands for copytoreg node when emitting calls. This fixes
...
Olden/msFix order of operands for copytoreg node when emitting calls. This fixes
Olden/mstt.
llvm-svn: 23125
2005-08-29 00:26:57 +00:00
Chris Lattner
21400573a7
Fix a bug in my previous patch that was using the wrong iterator. This fixes
...
Olden/bisort among others.
llvm-svn: 23124
2005-08-29 00:10:46 +00:00
Chris Lattner
33297adfb6
add operands in the correct order
...
llvm-svn: 23123
2005-08-29 00:02:01 +00:00
Chris Lattner
44dcf508a1
Fix a bug in ReplaceAllUsesWith
...
llvm-svn: 23122
2005-08-28 23:59:36 +00:00
Chris Lattner
bd8cf87228
Fix a bug in FP_EXTEND, implement FP_TO_SINT
...
llvm-svn: 23121
2005-08-28 23:59:09 +00:00
Chris Lattner
8a7276ca25
fix an assertion failure in treeadd
...
llvm-svn: 23120
2005-08-28 23:39:22 +00:00
Reid Spencer
a4acd20ae2
Adjust to member variable name change.
...
llvm-svn: 23119
2005-08-27 19:09:48 +00:00
Reid Spencer
31b20389f9
Change the names of member variables per Chris' instructions, and document
...
them more clearly.
llvm-svn: 23118
2005-08-27 19:09:02 +00:00
Reid Spencer
71966308fc
Fix a typo.
...
llvm-svn: 23117
2005-08-27 19:06:05 +00:00
Reid Spencer
46a7fdeb66
Implement PR614:
...
These changes modify the makefiles so that the output of flex and bison are
placed in the SRC directory, not the OBJ directory. It is intended that they
be checked in as any other LLVM source so that platforms without convenient
access to flex/bison can be compiled. From now on, if you change a .y or
.l file you *must* also commit the generated .cpp and .h files.
llvm-svn: 23115
2005-08-27 18:50:39 +00:00
Chris Lattner
e0eae3d244
Disable this code, which broke many tests last night
...
llvm-svn: 23114
2005-08-27 16:16:51 +00:00
Chris Lattner
6bf97cff13
fix PHI node emission for basic blocks that have select_cc's in them on ppc32
...
llvm-svn: 23113
2005-08-27 00:58:02 +00:00
Chris Lattner
25ce484c27
The condition register being branched on may not be cr0, as such, print it.
...
This fixes: UnitTests/2005-07-17-INT-To-FP.c
llvm-svn: 23112
2005-08-26 23:42:05 +00:00
Chris Lattner
a3689deabf
Propagate cr# from COND_BRANCH to the actual branch instruction as appropriate
...
llvm-svn: 23111
2005-08-26 23:41:27 +00:00
Chris Lattner
35a82f5f79
Nate noticed that Andrew never did this. This fixes PR600
...
llvm-svn: 23110
2005-08-26 22:50:40 +00:00
Chris Lattner
e9cc12f5c4
Don't copy regs that are only used in the entry block into a vreg. This
...
changes the code generated for:
short %test(short %A) {
%B = xor short %A, -32768
ret short %B
}
to:
_test:
xori r2, r3, 32768
xoris r2, r2, 65535
extsh r3, r2
blr
instead of:
_test:
rlwinm r2, r3, 0, 16, 31
xori r2, r3, 32768
xoris r2, r2, 65535
extsh r3, r2
blr
llvm-svn: 23109
2005-08-26 22:49:59 +00:00
Chris Lattner
5f55dd72af
Make this code safe for when loadRegFromStackSlot inserts multiple instructions.
...
llvm-svn: 23108
2005-08-26 22:18:32 +00:00
Chris Lattner
780ca10bcc
allow code using mtcrf to assemble
...
llvm-svn: 23107
2005-08-26 22:05:54 +00:00
Nate Begeman
d7f60a5eb6
Remove operand type 'crbit', since it is no longer used
...
llvm-svn: 23106
2005-08-26 22:04:17 +00:00
Chris Lattner
46daaac4e0
teach getClass what a condition reg is
...
llvm-svn: 23105
2005-08-26 21:51:29 +00:00
Chris Lattner
2c7a9bde76
Minor cleanups:
...
* avoid calling getClass() multiple times (it is relatively expensive)
* Allow -disable-fp-elim to turn of frame pointer elimination.
llvm-svn: 23104
2005-08-26 21:49:18 +00:00
Chris Lattner
7efca0c312
Checking types here is not safe, because multiple types can map to the same
...
register class.
llvm-svn: 23103
2005-08-26 21:39:15 +00:00
Chris Lattner
f470259b50
implement SELECT_CC fully for the DAG->DAG isel!
...
llvm-svn: 23101
2005-08-26 21:23:58 +00:00
Chris Lattner
e91069c4de
add some forward defs
...
llvm-svn: 23100
2005-08-26 21:06:40 +00:00
Chris Lattner
497c012e54
spell this right
...
llvm-svn: 23099
2005-08-26 20:55:40 +00:00
Chris Lattner
faa96209d8
Call the InsertAtEndOfBasicBlock hook if the usesCustomDAGSchedInserter
...
flag is set on an instruction.
llvm-svn: 23098
2005-08-26 20:54:47 +00:00
Chris Lattner
ac19224b29
spell this right!
...
llvm-svn: 23097
2005-08-26 20:53:44 +00:00
Chris Lattner
98bd9339ce
Add a hook
...
llvm-svn: 23096
2005-08-26 20:53:09 +00:00
Chris Lattner
6c4ea26961
spell this variable right
...
llvm-svn: 23095
2005-08-26 20:42:52 +00:00
Chris Lattner
b474a0ab06
Expose a new flag to TargetInstrInfo
...
llvm-svn: 23094
2005-08-26 20:40:46 +00:00
Chris Lattner
fd72abe85b
Add a new instruction flag
...
llvm-svn: 23093
2005-08-26 20:31:24 +00:00
Chris Lattner
405266a17c
Add a flag
...
llvm-svn: 23092
2005-08-26 20:29:01 +00:00
Chris Lattner
04b88ca768
Make fsel emission work with both the pattern and dag-dag selectors, by
...
giving it a non-instruction opcode. The dag->dag selector used to not
select the operands of the fsel, because it thought that whole tree was
already selected.
llvm-svn: 23091
2005-08-26 20:25:03 +00:00
Chris Lattner
17f0f9beae
add a marker at the end of the instruction enum list
...
llvm-svn: 23090
2005-08-26 20:17:00 +00:00
Chris Lattner
0d2ee60c48
implement the fold for:
...
bool %test(int %X, int %Y) {
%C = setne int %X, 0
ret bool %C
}
to:
_test:
addic r2, r3, -1
subfe r3, r2, r3
blr
llvm-svn: 23089
2005-08-26 18:46:49 +00:00
Chris Lattner
2d90a50778
Changes to adjust to new ReplaceAllUsesWith syntax. Change FP_EXTEND to
...
just return its input, instead of emitting an explicit copy.
llvm-svn: 23088
2005-08-26 18:37:23 +00:00
Chris Lattner
3e0bfc0cc1
Revampt ReplaceAllUsesWith to be more efficient and easier to use.
...
llvm-svn: 23087
2005-08-26 18:36:28 +00:00
Chris Lattner
25b6e62a46
Add a new version of ReplaceAllUsesWith, make the comments more useful.
...
llvm-svn: 23086
2005-08-26 18:35:58 +00:00
Nate Begeman
1c59e5bdd5
Remove some code made dead by the fsel patch
...
llvm-svn: 23085
2005-08-26 17:45:06 +00:00
Chris Lattner
a1c6bad722
now that fsel is formed during legalization, this code is dead
...
llvm-svn: 23084
2005-08-26 17:40:39 +00:00
Chris Lattner
007e1e07e3
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
439ef36320
Fix a bug in my previous checkin
...
llvm-svn: 23082
2005-08-26 17:18:44 +00:00
Chris Lattner
a31708e6b3
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
97a34c653d
Fix some warnings in an optimized build
...
llvm-svn: 23080
2005-08-26 16:38:51 +00:00
Chris Lattner
929c00e9e9
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
bf0a2d01be
Changed unsigned long to unsigned.
...
llvm-svn: 23078
2005-08-26 09:25:54 +00:00
Jim Laskey
a841c4183a
Change unsigned lng to unsigned.
...
llvm-svn: 23077
2005-08-26 09:24:46 +00:00
Nate Begeman
2d6f0e333a
Fix JIT encoding of conditional branches
...
llvm-svn: 23076
2005-08-26 04:11:42 +00:00
Chris Lattner
dae9a4899f
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
6d22117d76
the 5th operand is the 4th number
...
llvm-svn: 23074
2005-08-26 00:43:46 +00:00