Nate Begeman [Tue, 30 Aug 2005 02:54:28 +0000 (02:54 +0000)]
Remove a bogus piece of my AssertSext/AssertZext patch. oops.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23148
91177308-0d34-0410-b5e6-
96231b3b80d8
Nate Begeman [Tue, 30 Aug 2005 02:44:00 +0000 (02:44 +0000)]
Add support for AssertSext and AssertZext, folding other extensions with
them. This allows for elminination of redundant extends in the entry
blocks of functions on PowerPC.
Add support for i32 x i32 -> i64 multiplies, by recognizing when the inputs
to ISD::MUL in ExpandOp are actually just extended i32 values and not real
i64 values. this allows us to codegen
int mulhs(int a, int b) { return ((long long)a * b) >> 32; }
as:
_mulhs:
mulhw r3, r4, r3
blr
instead of:
_mulhs:
mulhwu r2, r4, r3
srawi r5, r3, 31
mullw r5, r4, r5
add r2, r2, r5
srawi r4, r4, 31
mullw r3, r4, r3
add r3, r2, r3
blr
with a similar improvement on x86.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23147
91177308-0d34-0410-b5e6-
96231b3b80d8
Nate Begeman [Tue, 30 Aug 2005 02:39:32 +0000 (02:39 +0000)]
Add AssertSext, AssertZext nodes for targets that pass arguments in
registers, and the incoming values have already been zero or sign extended
from the appopriate type to the register width.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23146
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 30 Aug 2005 01:58:51 +0000 (01:58 +0000)]
Name this variable to be what it really is!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23145
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 30 Aug 2005 01:57:23 +0000 (01:57 +0000)]
Handle CopyToReg nodes with flag operands correctly
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23144
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 30 Aug 2005 01:57:02 +0000 (01:57 +0000)]
Make sure the selector emits register register copies with flag operands
linking them to calls when appropriate, this prevents the scheduler from
pulling these copies away from the call.
This fixes Ptrdist/yacr2
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23143
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 30 Aug 2005 01:56:13 +0000 (01:56 +0000)]
add some method variants
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23142
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 30 Aug 2005 00:59:16 +0000 (00:59 +0000)]
The first operand to AND does not always have more than two operands. This
fixes MediaBench/toast with the dag selector
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23141
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 30 Aug 2005 00:45:18 +0000 (00:45 +0000)]
Fix a bug in my patch for legalizing to fsel. It cannot handle seteq/setne,
which I failed to include when I moved the code over. This fixes
MallocBench/gs.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23140
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 30 Aug 2005 00:30:43 +0000 (00:30 +0000)]
emit FMR instructions to convert f64<->f32 instructions, so things like
STOREs, know the right type to store.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23139
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 30 Aug 2005 00:19:00 +0000 (00:19 +0000)]
Fix some really strange indentation that xcode likes to use.
no xcode, this is not right:
if (!foo) break;
X;
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23138
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 29 Aug 2005 23:49:25 +0000 (23:49 +0000)]
fix a crash in cfrac
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23137
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 29 Aug 2005 23:30:11 +0000 (23:30 +0000)]
Implement DYNAMIC_STACKALLOC, wrap some long lines
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23136
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 29 Aug 2005 23:21:29 +0000 (23:21 +0000)]
Add a hack to avoid some horrible code in some cases by always emitting
token chains first. For this C function:
int test() {
int i;
for (i = 0; i < 100000; ++i)
foo();
}
Instead of emitting this (condition before call)
.LBB_test_1: ; no_exit
addi r30, r30, 1
lis r2, 1
ori r2, r2, 34464
cmpw cr2, r30, r2
bl L_foo$stub
bne cr2, .LBB_test_1 ; no_exit
Emit this:
.LBB_test_1: ; no_exit
bl L_foo$stub
addi r30, r30, 1
lis r2, 1
ori r2, r2, 34464
cmpw cr0, r30, r2
bne cr0, .LBB_test_1 ; no_exit
Which makes it so we don't have to save/restore cr2 in the prolog/epilog of
the function.
This also makes the code much more similar to what the pattern isel produces.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23135
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 29 Aug 2005 22:48:32 +0000 (22:48 +0000)]
improve comment
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23134
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 29 Aug 2005 22:22:57 +0000 (22:22 +0000)]
Fix a dumb bug of mine where we were mishandling the PPC ABI (undef handling).
This fixes voronoi and bh in Olden, allowing all of olden to pass!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23133
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 29 Aug 2005 22:00:00 +0000 (22:00 +0000)]
Add a new API for nate
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23132
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 29 Aug 2005 21:59:31 +0000 (21:59 +0000)]
Add a new API for Nate
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23131
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Lenharth [Mon, 29 Aug 2005 20:46:51 +0000 (20:46 +0000)]
Some of us cared about the the promote path
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23130
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 29 Aug 2005 17:30:00 +0000 (17:30 +0000)]
Fix an infinite loop on x86
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23129
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 29 Aug 2005 13:14:24 +0000 (13:14 +0000)]
Allow bugpoint+PPC codegen to use fsqrt
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23128
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 29 Aug 2005 01:07:02 +0000 (01:07 +0000)]
Fix a bug the last patch exposed in treeadd among others
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23127
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 29 Aug 2005 01:01:01 +0000 (01:01 +0000)]
A hack to fix a problem folding immedaites. This fixes Olden/power.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23126
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 29 Aug 2005 00:26:57 +0000 (00:26 +0000)]
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23125
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 29 Aug 2005 00:10:46 +0000 (00:10 +0000)]
Fix a bug in my previous patch that was using the wrong iterator. This fixes
Olden/bisort among others.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23124
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 29 Aug 2005 00:02:01 +0000 (00:02 +0000)]
add operands in the correct order
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23123
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 28 Aug 2005 23:59:36 +0000 (23:59 +0000)]
Fix a bug in ReplaceAllUsesWith
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23122
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 28 Aug 2005 23:59:09 +0000 (23:59 +0000)]
Fix a bug in FP_EXTEND, implement FP_TO_SINT
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23121
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 28 Aug 2005 23:39:22 +0000 (23:39 +0000)]
fix an assertion failure in treeadd
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23120
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Spencer [Sat, 27 Aug 2005 19:09:48 +0000 (19:09 +0000)]
Adjust to member variable name change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23119
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Spencer [Sat, 27 Aug 2005 19:09:02 +0000 (19:09 +0000)]
Change the names of member variables per Chris' instructions, and document
them more clearly.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23118
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Spencer [Sat, 27 Aug 2005 19:06:05 +0000 (19:06 +0000)]
Fix a typo.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23117
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Spencer [Sat, 27 Aug 2005 18:50:39 +0000 (18:50 +0000)]
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23115
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 27 Aug 2005 16:16:51 +0000 (16:16 +0000)]
Disable this code, which broke many tests last night
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23114
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 27 Aug 2005 00:58:02 +0000 (00:58 +0000)]
fix PHI node emission for basic blocks that have select_cc's in them on ppc32
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23113
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 26 Aug 2005 23:42:05 +0000 (23:42 +0000)]
The condition register being branched on may not be cr0, as such, print it.
This fixes: UnitTests/2005-07-17-INT-To-FP.c
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23112
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 26 Aug 2005 23:41:27 +0000 (23:41 +0000)]
Propagate cr# from COND_BRANCH to the actual branch instruction as appropriate
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23111
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 26 Aug 2005 22:50:40 +0000 (22:50 +0000)]
Nate noticed that Andrew never did this. This fixes PR600
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23110
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 26 Aug 2005 22:49:59 +0000 (22:49 +0000)]
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
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23109
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 26 Aug 2005 22:18:32 +0000 (22:18 +0000)]
Make this code safe for when loadRegFromStackSlot inserts multiple instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23108
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 26 Aug 2005 22:05:54 +0000 (22:05 +0000)]
allow code using mtcrf to assemble
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23107
91177308-0d34-0410-b5e6-
96231b3b80d8
Nate Begeman [Fri, 26 Aug 2005 22:04:17 +0000 (22:04 +0000)]
Remove operand type 'crbit', since it is no longer used
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23106
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 26 Aug 2005 21:51:29 +0000 (21:51 +0000)]
teach getClass what a condition reg is
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23105
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 26 Aug 2005 21:49:18 +0000 (21:49 +0000)]
Minor cleanups:
* avoid calling getClass() multiple times (it is relatively expensive)
* Allow -disable-fp-elim to turn of frame pointer elimination.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23104
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 26 Aug 2005 21:39:15 +0000 (21:39 +0000)]
Checking types here is not safe, because multiple types can map to the same
register class.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23103
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 26 Aug 2005 21:23:58 +0000 (21:23 +0000)]
implement SELECT_CC fully for the DAG->DAG isel!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23101
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 26 Aug 2005 21:06:40 +0000 (21:06 +0000)]
add some forward defs
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23100
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 26 Aug 2005 20:55:40 +0000 (20:55 +0000)]
spell this right
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23099
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 26 Aug 2005 20:54:47 +0000 (20:54 +0000)]
Call the InsertAtEndOfBasicBlock hook if the usesCustomDAGSchedInserter
flag is set on an instruction.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23098
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 26 Aug 2005 20:53:44 +0000 (20:53 +0000)]
spell this right!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23097
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 26 Aug 2005 20:53:09 +0000 (20:53 +0000)]
Add a hook
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23096
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 26 Aug 2005 20:42:52 +0000 (20:42 +0000)]
spell this variable right
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23095
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 26 Aug 2005 20:40:46 +0000 (20:40 +0000)]
Expose a new flag to TargetInstrInfo
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23094
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 26 Aug 2005 20:31:24 +0000 (20:31 +0000)]
Add a new instruction flag
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23093
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 26 Aug 2005 20:29:01 +0000 (20:29 +0000)]
Add a flag
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23092
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 26 Aug 2005 20:25:03 +0000 (20:25 +0000)]
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23091
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 26 Aug 2005 20:17:00 +0000 (20:17 +0000)]
add a marker at the end of the instruction enum list
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23090
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 26 Aug 2005 18:46:49 +0000 (18:46 +0000)]
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
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23089
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 26 Aug 2005 18:37:23 +0000 (18:37 +0000)]
Changes to adjust to new ReplaceAllUsesWith syntax. Change FP_EXTEND to
just return its input, instead of emitting an explicit copy.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23088
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 26 Aug 2005 18:36:28 +0000 (18:36 +0000)]
Revampt ReplaceAllUsesWith to be more efficient and easier to use.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23087
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 26 Aug 2005 18:35:58 +0000 (18:35 +0000)]
Add a new version of ReplaceAllUsesWith, make the comments more useful.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23086
91177308-0d34-0410-b5e6-
96231b3b80d8
Nate Begeman [Fri, 26 Aug 2005 17:45:06 +0000 (17:45 +0000)]
Remove some code made dead by the fsel patch
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23085
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 26 Aug 2005 17:40:39 +0000 (17:40 +0000)]
now that fsel is formed during legalization, this code is dead
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23084
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 26 Aug 2005 17:36:52 +0000 (17:36 +0000)]
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23083
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 26 Aug 2005 17:18:44 +0000 (17:18 +0000)]
Fix a bug in my previous checkin
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23082
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 26 Aug 2005 17:15:30 +0000 (17:15 +0000)]
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23081
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 26 Aug 2005 16:38:51 +0000 (16:38 +0000)]
Fix some warnings in an optimized build
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23080
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 26 Aug 2005 16:36:26 +0000 (16:36 +0000)]
Fix a huge annoyance: SelectNodeTo took types before the opcode unlike
every other SD API. Fix it to take the opcode before the types.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23079
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Laskey [Fri, 26 Aug 2005 09:25:54 +0000 (09:25 +0000)]
Changed unsigned long to unsigned.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23078
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Laskey [Fri, 26 Aug 2005 09:24:46 +0000 (09:24 +0000)]
Change unsigned lng to unsigned.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23077
91177308-0d34-0410-b5e6-
96231b3b80d8
Nate Begeman [Fri, 26 Aug 2005 04:11:42 +0000 (04:11 +0000)]
Fix JIT encoding of conditional branches
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23076
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 26 Aug 2005 00:52:45 +0000 (00:52 +0000)]
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23075
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 26 Aug 2005 00:43:46 +0000 (00:43 +0000)]
the 5th operand is the 4th number
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23074
91177308-0d34-0410-b5e6-
96231b3b80d8
Nate Begeman [Fri, 26 Aug 2005 00:34:06 +0000 (00:34 +0000)]
SUBFIC produces two results, not one.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23073
91177308-0d34-0410-b5e6-
96231b3b80d8
Nate Begeman [Fri, 26 Aug 2005 00:28:00 +0000 (00:28 +0000)]
Implement SHL_PARTS and SRL_PARTS
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23072
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 26 Aug 2005 00:23:59 +0000 (00:23 +0000)]
Add support for targets that want to custom expand select_cc in some cases.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23071
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 26 Aug 2005 00:14:16 +0000 (00:14 +0000)]
Allow LowerOperation to return a null SDOperand in case it wants to lower
some things given to it, but not all.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23070
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 26 Aug 2005 00:13:12 +0000 (00:13 +0000)]
Fix a nasty bug from a previous patch of mine
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23069
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 25 Aug 2005 23:36:49 +0000 (23:36 +0000)]
Emit the lo/hi parts in the right order :)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23068
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Laskey [Thu, 25 Aug 2005 23:31:45 +0000 (23:31 +0000)]
Added cl::bits option type (bit vectors). See "Collecting options as a set
of flags" in the Command Line doc.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23067
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 25 Aug 2005 23:21:06 +0000 (23:21 +0000)]
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23066
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 25 Aug 2005 23:19:58 +0000 (23:19 +0000)]
simplify the add/sub_parts code
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23065
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Laskey [Thu, 25 Aug 2005 23:01:25 +0000 (23:01 +0000)]
Tweak of multiple occurance paragraph.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23064
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Laskey [Thu, 25 Aug 2005 22:52:43 +0000 (22:52 +0000)]
Documentation updated to include upcoming support for bit vector support
(flags.)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23063
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 25 Aug 2005 22:04:30 +0000 (22:04 +0000)]
Finish implementing SDIV/UDIV by copying over the majik constant code from
ISelPattern
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23062
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 25 Aug 2005 22:03:50 +0000 (22:03 +0000)]
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
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23061
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 25 Aug 2005 21:39:42 +0000 (21:39 +0000)]
Implement setcc correctly for G5 and non-G5 systems
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23060
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 25 Aug 2005 20:08:18 +0000 (20:08 +0000)]
implement setcc on the G5. We're still missing the non-g5 specific bits, but
they will come later.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23059
91177308-0d34-0410-b5e6-
96231b3b80d8
Nate Begeman [Thu, 25 Aug 2005 20:04:38 +0000 (20:04 +0000)]
New fold for SELECT_CC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23058
91177308-0d34-0410-b5e6-
96231b3b80d8
Nate Begeman [Thu, 25 Aug 2005 20:01:10 +0000 (20:01 +0000)]
Remove option to make SetCC illegal on PowerPC after long discussion with
Chris. This will be accomplished through correctly modeling CR's and
subregs.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23056
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 25 Aug 2005 19:12:10 +0000 (19:12 +0000)]
Don't auto-cse nodes that return flags
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23055
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 25 Aug 2005 17:59:23 +0000 (17:59 +0000)]
add printer support for flag operands
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23054
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 25 Aug 2005 17:54:58 +0000 (17:54 +0000)]
simplify the code a bit using isOperationLegal
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23053
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 25 Aug 2005 17:50:06 +0000 (17:50 +0000)]
Add support for sdiv by 2^k and -2^k. Producing code like:
_test:
srawi r2, r3, 2
addze r3, r2
blr
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23052
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 25 Aug 2005 17:49:31 +0000 (17:49 +0000)]
fit in 80 cols
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23051
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 25 Aug 2005 17:48:54 +0000 (17:48 +0000)]
Add support for flag operands
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23050
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 25 Aug 2005 17:24:09 +0000 (17:24 +0000)]
add a method
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23049
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 25 Aug 2005 17:07:09 +0000 (17:07 +0000)]
add an enum value
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23048
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Laskey [Thu, 25 Aug 2005 16:44:13 +0000 (16:44 +0000)]
Remove Support/Search.h entry
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23047
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Laskey [Thu, 25 Aug 2005 16:21:56 +0000 (16:21 +0000)]
Recommended to use std::algorithms instead.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23046
91177308-0d34-0410-b5e6-
96231b3b80d8