summaryrefslogtreecommitdiffstats
path: root/llvm/lib
Commit message (Collapse)AuthorAgeFilesLines
* Remove a bogus piece of my AssertSext/AssertZext patch. oops.Nate Begeman2005-08-301-2/+0
| | | | llvm-svn: 23148
* Add support for AssertSext and AssertZext, folding other extensions withNate Begeman2005-08-302-9/+43
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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. llvm-svn: 23147
* Name this variable to be what it really is!Chris Lattner2005-08-301-4/+4
| | | | llvm-svn: 23145
* Handle CopyToReg nodes with flag operands correctlyChris Lattner2005-08-301-1/+6
| | | | llvm-svn: 23144
* Make sure the selector emits register register copies with flag operandsChris Lattner2005-08-301-10/+20
| | | | | | | | | linking them to calls when appropriate, this prevents the scheduler from pulling these copies away from the call. This fixes Ptrdist/yacr2 llvm-svn: 23143
* The first operand to AND does not always have more than two operands. ThisChris Lattner2005-08-301-1/+2
| | | | | | fixes MediaBench/toast with the dag selector llvm-svn: 23141
* Fix a bug in my patch for legalizing to fsel. It cannot handle seteq/setne,Chris Lattner2005-08-301-0/+4
| | | | | | | which I failed to include when I moved the code over. This fixes MallocBench/gs. llvm-svn: 23140
* emit FMR instructions to convert f64<->f32 instructions, so things likeChris Lattner2005-08-301-8/+15
| | | | | | STOREs, know the right type to store. llvm-svn: 23139
* Fix some really strange indentation that xcode likes to use.Chris Lattner2005-08-301-157/+158
| | | | | | | | | no xcode, this is not right: if (!foo) break; X; llvm-svn: 23138
* fix a crash in cfracChris Lattner2005-08-291-2/+2
| | | | llvm-svn: 23137
* Implement DYNAMIC_STACKALLOC, wrap some long linesChris Lattner2005-08-291-2/+35
| | | | llvm-svn: 23136
* Add a hack to avoid some horrible code in some cases by always emittingChris Lattner2005-08-291-12/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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. llvm-svn: 23135
* Fix a dumb bug of mine where we were mishandling the PPC ABI (undef handling).Chris Lattner2005-08-291-15/+16
| | | | | | This fixes voronoi and bh in Olden, allowing all of olden to pass! llvm-svn: 23133
* Add a new API for NateChris Lattner2005-08-291-0/+27
| | | | llvm-svn: 23131
* Some of us cared about the the promote pathAndrew Lenharth2005-08-291-0/+4
| | | | llvm-svn: 23130
* Fix an infinite loop on x86Chris Lattner2005-08-291-1/+1
| | | | llvm-svn: 23129
* Allow bugpoint+PPC codegen to use fsqrtChris Lattner2005-08-291-0/+3
| | | | llvm-svn: 23128
* Fix a bug the last patch exposed in treeadd among othersChris Lattner2005-08-291-1/+1
| | | | llvm-svn: 23127
* A hack to fix a problem folding immedaites. This fixes Olden/power.Chris Lattner2005-08-291-4/+8
| | | | llvm-svn: 23126
* Fix order of operands for copytoreg node when emitting calls. This fixesChris Lattner2005-08-291-1/+1
| | | | | | | Olden/msFix order of operands for copytoreg node when emitting calls. This fixes Olden/mstt. llvm-svn: 23125
* Fix a bug in my previous patch that was using the wrong iterator. This fixesChris Lattner2005-08-291-1/+1
| | | | | | Olden/bisort among others. llvm-svn: 23124
* add operands in the correct orderChris Lattner2005-08-291-2/+2
| | | | llvm-svn: 23123
* Fix a bug in ReplaceAllUsesWithChris Lattner2005-08-281-1/+1
| | | | llvm-svn: 23122
* Fix a bug in FP_EXTEND, implement FP_TO_SINTChris Lattner2005-08-281-3/+15
| | | | llvm-svn: 23121
* fix an assertion failure in treeaddChris Lattner2005-08-281-2/+2
| | | | llvm-svn: 23120
* Adjust to member variable name change.Reid Spencer2005-08-271-1/+1
| | | | llvm-svn: 23119
* Change the names of member variables per Chris' instructions, and documentReid Spencer2005-08-271-2/+2
| | | | | | them more clearly. llvm-svn: 23118
* Implement PR614:Reid Spencer2005-08-275-5/+7414
| | | | | | | | | | 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
* Disable this code, which broke many tests last nightChris Lattner2005-08-271-1/+1
| | | | llvm-svn: 23114
* fix PHI node emission for basic blocks that have select_cc's in them on ppc32Chris Lattner2005-08-271-2/+3
| | | | llvm-svn: 23113
* The condition register being branched on may not be cr0, as such, print it.Chris Lattner2005-08-261-6/+6
| | | | | | This fixes: UnitTests/2005-07-17-INT-To-FP.c llvm-svn: 23112
* Propagate cr# from COND_BRANCH to the actual branch instruction as appropriateChris Lattner2005-08-261-2/+3
| | | | llvm-svn: 23111
* Nate noticed that Andrew never did this. This fixes PR600Chris Lattner2005-08-261-1/+1
| | | | llvm-svn: 23110
* Don't copy regs that are only used in the entry block into a vreg. ThisChris Lattner2005-08-261-3/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Make this code safe for when loadRegFromStackSlot inserts multiple instructions.Chris Lattner2005-08-261-1/+13
| | | | llvm-svn: 23108
* allow code using mtcrf to assembleChris Lattner2005-08-261-1/+1
| | | | llvm-svn: 23107
* Remove operand type 'crbit', since it is no longer usedNate Begeman2005-08-262-11/+0
| | | | llvm-svn: 23106
* teach getClass what a condition reg isChris Lattner2005-08-261-3/+5
| | | | llvm-svn: 23105
* Minor cleanups:Chris Lattner2005-08-261-7/+8
| | | | | | | * avoid calling getClass() multiple times (it is relatively expensive) * Allow -disable-fp-elim to turn of frame pointer elimination. llvm-svn: 23104
* Checking types here is not safe, because multiple types can map to the sameChris Lattner2005-08-261-3/+0
| | | | | | register class. llvm-svn: 23103
* implement SELECT_CC fully for the DAG->DAG isel!Chris Lattner2005-08-264-2/+79
| | | | llvm-svn: 23101
* spell this rightChris Lattner2005-08-261-1/+1
| | | | llvm-svn: 23099
* Call the InsertAtEndOfBasicBlock hook if the usesCustomDAGSchedInserterChris Lattner2005-08-262-1/+22
| | | | | | flag is set on an instruction. llvm-svn: 23098
* Add a flagChris Lattner2005-08-261-0/+1
| | | | llvm-svn: 23092
* Make fsel emission work with both the pattern and dag-dag selectors, byChris Lattner2005-08-264-14/+34
| | | | | | | | 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
* implement the fold for:Chris Lattner2005-08-261-0/+21
| | | | | | | | | | | | | | | | 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
* Changes to adjust to new ReplaceAllUsesWith syntax. Change FP_EXTEND toChris Lattner2005-08-261-13/+15
| | | | | | just return its input, instead of emitting an explicit copy. llvm-svn: 23088
* Revampt ReplaceAllUsesWith to be more efficient and easier to use.Chris Lattner2005-08-261-5/+53
| | | | llvm-svn: 23087
* Remove some code made dead by the fsel patchNate Begeman2005-08-261-1/+0
| | | | llvm-svn: 23085
* now that fsel is formed during legalization, this code is deadChris Lattner2005-08-262-102/+0
| | | | llvm-svn: 23084
OpenPOWER on IntegriCloud