summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Fix CodeGen/Generic/2005-05-09-GlobalInPHI.ll, which was reduced from 254.gap.Chris Lattner2005-04-091-0/+16
| | | | | | | | This caused the "use before a def" assertion on some programs. With this patch, 254.gap now passes with the PPC backend. llvm-svn: 21191
* new testcase that used to crash the ppc fe. It could effect any simpleiselChris Lattner2005-04-091-0/+21
| | | | | | that is not careful, so I'm checking it into the generic tests. llvm-svn: 21190
* add a little peephole optimization. This allows us to codegen:Chris Lattner2005-04-091-0/+11
| | | | | | | | | | | | | | | | | | | | | | | int a(short i) { return i & 1; } as _a: andi. r3, r3, 1 blr instead of: _a: rlwinm r2, r3, 0, 16, 31 andi. r3, r2, 1 blr on ppc. It should also help the other risc targets. llvm-svn: 21189
* 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
* add routines to track the livein/out set for a functionChris Lattner2005-04-091-0/+21
| | | | llvm-svn: 21179
* 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
* Add a testcase to make sure that we don't emit two fneg instructions backNate Begeman2005-04-091-0/+8
| | | | | | to back for certain fsel instructions. llvm-svn: 21176
* Add cases to cover the rest of the patterns we should be matchingNate Begeman2005-04-091-6/+16
| | | | llvm-svn: 21175
* 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
* New testcase that the sparc backend crashes onChris Lattner2005-04-091-0/+12
| | | | llvm-svn: 21173
* 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
* make this test more interestingChris Lattner2005-04-091-1/+8
| | | | llvm-svn: 21170
* add a test for fnabsChris Lattner2005-04-091-0/+11
| | | | llvm-svn: 21169
* add a partial test for the fma operations that ppc supports. I'm sure I'mChris Lattner2005-04-091-0/+30
| | | | | | | missing some and not all of these match yet, but I'm sure that Nate will clean up my mess :) llvm-svn: 21168
* 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
* Add a new nodeChris Lattner2005-04-091-0/+7
| | | | llvm-svn: 21162
* 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
* fix this method for 64-bit constantsChris Lattner2005-04-081-1/+3
| | | | llvm-svn: 21158
* 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
* oopsAndrew Lenharth2005-04-083-3/+3
| | | | llvm-svn: 21155
* added some tests to check stupid pattern matching mistakesAndrew Lenharth2005-04-085-0/+52
| | | | llvm-svn: 21154
* 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
* new testcase that crashes the instcombiner.Chris Lattner2005-04-081-0/+7
| | | | llvm-svn: 21151
* 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
* Allow targets which produce setcc results in non-MVT::i1 registers to describeChris Lattner2005-04-071-1/+23
| | | | | | | what the contents of the top bits of these registers are, in the common cases of targets that sign and zero extend the results. llvm-svn: 21145
* 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
* match case change in codegenAndrew Lenharth2005-04-071-1/+1
| | | | llvm-svn: 21141
* 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
OpenPOWER on IntegriCloud