summaryrefslogtreecommitdiffstats
path: root/llvm/lib
Commit message (Collapse)AuthorAgeFilesLines
* do not set the root to null if an argument is deadChris Lattner2005-04-091-1/+2
| | | | llvm-svn: 21188
* Add rlwnm instruction for variable rotateNate Begeman2005-04-092-29/+79
| | | | | | | | Generate rotate left/right immediate Generate code for brcondtwoway Use new livein/liveout functionality llvm-svn: 21187
* Fix a crash on 173.applu by asking for a constant bigger than 32-bits.Chris Lattner2005-04-091-1/+1
| | | | llvm-svn: 21185
* Switch this instruction selector over to using liveins and liveouts, eliminatingChris Lattner2005-04-091-8/+26
| | | | | | implicit defs on entry to the function. yaay :) llvm-svn: 21184
* there is no need to remove this instruction, linscan does it already as itChris Lattner2005-04-091-5/+0
| | | | | | removes noop moves. llvm-svn: 21183
* Adjust live intervals to support a livein setChris Lattner2005-04-091-2/+44
| | | | llvm-svn: 21182
* Use live out sets for return values instead of imp_defs, which is cleaner ↵Chris Lattner2005-04-092-14/+41
| | | | | | and faster. llvm-svn: 21181
* Consider the livein/out set for a function, allowing targets to not have toChris Lattner2005-04-091-0/+20
| | | | | | use ugly imp_def/imp_uses for arguments and return values. llvm-svn: 21180
* ok, the "ia64 has a boatload of registers" joke stopped being funny today ;)Duraid Madina2005-04-091-1/+6
| | | | | | | | | | * fix overallocation of integer (stacked) registers: we can't allocate registers for local use if they are required as output registers this fixes 'toast' in the test suite, and all sorts of larger programs like bzip2 etc. llvm-svn: 21178
* Optimize FSEL a bit for fneg arguments. This fixes the recently added testNate Begeman2005-04-091-11/+12
| | | | | | | | | | | | | | | | | | | | case so that we emit _test_fneg_sel: .LBB_test_fneg_sel_0: ; fsel f1, f1, f3, f2 blr instead of: _test_fneg_sel: .LBB_test_fneg_sel_0: ; fneg f0, f1 fneg f0, f0 fsel f1, f0, f3, f2 blr llvm-svn: 21177
* Fix CodeGen/SparcV9/2005-05-09-GEP-Crash.ll a crash on some specfp programChris Lattner2005-04-091-1/+1
| | | | | | lets hope this doesn't break other programs with induced entropy llvm-svn: 21174
* recognize some patterns as fabs operations, so that fabs at the source levelChris Lattner2005-04-091-0/+21
| | | | | | | | | | | | | is deconstructed then reconstructed here. This catches 19 fabs's in 177.mesa 9 in 168.wupwise, 5 in 171.swim, 3 in 172.mgrid, and 14 in 173.applu out of specfp2000. This allows the X86 code generator to make MUCH better code than before for each of these and saves one instr on ppc. This depends on the previous CFE patch to expose these correctly. llvm-svn: 21171
* Emit BRCONDTWOWAY when possible.Chris Lattner2005-04-091-7/+6
| | | | llvm-svn: 21167
* Legalize BRCONDTWOWAY into a BRCOND/BR pair if a target doesn't support it.Chris Lattner2005-04-091-0/+33
| | | | llvm-svn: 21166
* print and fold BRCONDTWOWAY correctlyChris Lattner2005-04-091-11/+25
| | | | llvm-svn: 21165
* This target does not support/want ISD::BRCONDTWOWAYChris Lattner2005-04-093-0/+3
| | | | llvm-svn: 21164
* This target does not yet support ISD::BRCONDTWOWAYChris Lattner2005-04-092-0/+2
| | | | llvm-svn: 21163
* 64b: Expand S/UREMNate Begeman2005-04-092-7/+31
| | | | | | | | | 32b: No longer pattern match fneg(fsub(fmul)) as fnmsub Pattern match fsub a, mul(b, c) as fnmsub Pattern match fadd a, mul(b, c) as fmadd Those changes speed up hydro2d by 2.5%, distray by 6%, and scimark by 8% llvm-svn: 21161
* canonicalize a bunch of operations involving fnegChris Lattner2005-04-091-0/+21
| | | | llvm-svn: 21160
* Fix 64b shiftsNate Begeman2005-04-081-26/+13
| | | | llvm-svn: 21159
* Match Mac OS X 64 bit calling conventionsNate Begeman2005-04-081-116/+46
| | | | llvm-svn: 21157
* collect a few statistics, factor constants (constant loading and mult), fix ↵Andrew Lenharth2005-04-081-10/+66
| | | | | | logic operation pattern matchs, supress FP div when int dividing by a constant llvm-svn: 21156
* fix bogus division-by-power-of-2 (was wrong for negative input, adds extr insn)Duraid Madina2005-04-082-15/+25
| | | | | | fix hack in division (clean up frcpa instruction) llvm-svn: 21153
* Fix bug: InstCombine/2005-05-07-UDivSelectCrash.llChris Lattner2005-04-081-14/+16
| | | | llvm-svn: 21152
* Optimized code sequences for setcc reg, 0Nate Begeman2005-04-071-4/+77
| | | | | | Optimized code sequence for (a < 0) ? b : 0 llvm-svn: 21150
* Alpha zero extends setcc resultsAndrew Lenharth2005-04-071-0/+1
| | | | llvm-svn: 21149
* If a target zero or sign extends the result of its setcc, allow folding ofChris Lattner2005-04-071-1/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | this into sign/zero extension instructions later. On PPC, for example, this testcase: %G = external global sbyte implementation void %test(int %X, int %Y) { %C = setlt int %X, %Y %D = cast bool %C to sbyte store sbyte %D, sbyte* %G ret void } Now codegens to: cmpw cr0, r3, r4 li r3, 1 li r4, 0 blt .LBB_test_2 ; .LBB_test_1: ; or r3, r4, r4 .LBB_test_2: ; addis r2, r2, ha16(L_G$non_lazy_ptr-"L00000$pb") lwz r2, lo16(L_G$non_lazy_ptr-"L00000$pb")(r2) stb r3, 0(r2) instead of: cmpw cr0, r3, r4 li r3, 1 li r4, 0 blt .LBB_test_2 ; .LBB_test_1: ; or r3, r4, r4 .LBB_test_2: ; *** rlwinm r3, r3, 0, 31, 31 addis r2, r2, ha16(L_G$non_lazy_ptr-"L00000$pb") lwz r2, lo16(L_G$non_lazy_ptr-"L00000$pb")(r2) stb r3, 0(r2) llvm-svn: 21148
* PowerPC zero extends setcc resultsChris Lattner2005-04-071-0/+1
| | | | llvm-svn: 21147
* X86 zero extends setcc resultsChris Lattner2005-04-071-0/+1
| | | | llvm-svn: 21146
* Remove somethign I had for testingChris Lattner2005-04-071-1/+1
| | | | llvm-svn: 21144
* fix a small optimization opertunity and make gcc happyAndrew Lenharth2005-04-071-3/+1
| | | | llvm-svn: 21143
* This patch does two things. First, it canonicalizes 'X >= C' -> 'X > C-1'Chris Lattner2005-04-071-7/+49
| | | | | | | | | | | | | | | | | | | | (likewise for <= >=u >=u). Second, it implements a special case hack to turn 'X gtu SINTMAX' -> 'X lt 0' On powerpc, for example, this changes this: lis r2, 32767 ori r2, r2, 65535 cmplw cr0, r3, r2 bgt .LBB_test_2 into: cmpwi cr0, r3, 0 blt .LBB_test_2 llvm-svn: 21142
* fixup magic constant making code. tested by thousands of random ↵Andrew Lenharth2005-04-071-10/+10
| | | | | | divisions.... by 10000. ok, so random divisors would be good too, but this at least fixes some things llvm-svn: 21140
* lowercase instructions, makes diff happierAndrew Lenharth2005-04-071-71/+71
| | | | llvm-svn: 21139
* Implement the following xforms:Chris Lattner2005-04-071-3/+18
| | | | | | | | (X-Y)-X --> -Y A + (B - A) --> B (B - A) + A --> B llvm-svn: 21138
* Implement InstCombine/add.ll:test28, transforming C1-(X+C2) --> (C1-C2)-X.Chris Lattner2005-04-071-2/+8
| | | | | | | This occurs several dozen times in specint2k, particularly in crafty and gcc apparently. llvm-svn: 21136
* Transform X-(X+Y) == -Y and X-(Y+X) == -YChris Lattner2005-04-071-2/+11
| | | | llvm-svn: 21134
* It wasn't happy about this eitherAndrew Lenharth2005-04-071-1/+1
| | | | llvm-svn: 21133
* Yea, it wasn't happyAndrew Lenharth2005-04-071-0/+1
| | | | llvm-svn: 21132
* teach asmprinter to print s8/s14 operandsDuraid Madina2005-04-071-0/+12
| | | | llvm-svn: 21131
* codegen immediate forms of add/sub/shiftDuraid Madina2005-04-071-13/+66
| | | | llvm-svn: 21130
* add immediate forms of add, sub, shiftDuraid Madina2005-04-071-0/+14
| | | | llvm-svn: 21129
* Fix a really scary bug that Nate found where we weren't deleting the rightChris Lattner2005-04-071-1/+1
| | | | | | elements auto of the autoCSE maps. llvm-svn: 21128
* Pattern match bitfield insert, which helps shift long by immediate, amongNate Begeman2005-04-061-15/+152
| | | | | | other things. llvm-svn: 21127
* Fix some shift bugsNate Begeman2005-04-061-3/+12
| | | | llvm-svn: 21126
* Make these 64 bit constants so that this compiles on x86-32 as well.Alkis Evlogimenos2005-04-061-6/+6
| | | | llvm-svn: 21125
* added sdiv by 2^k and works for neg divisors alsoAndrew Lenharth2005-04-061-10/+59
| | | | llvm-svn: 21124
* Don't make this require loopsimplify. It works BETTER with loop simplifyChris Lattner2005-04-061-1/+0
| | | | | | but should not require it. llvm-svn: 21123
* Teach ExpandShift how to handle shifts by a constant. This allows targetsNate Begeman2005-04-061-8/+64
| | | | | | like PowerPC to codegen long shifts in many fewer instructions. llvm-svn: 21122
* fix copy/paste errors, and add imm support to SxADDQ and SxSUBQAndrew Lenharth2005-04-061-8/+32
| | | | llvm-svn: 21121
OpenPOWER on IntegriCloud