summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/PowerPC
Commit message (Collapse)AuthorAgeFilesLines
* Implement floating point select for lt, gt, le, ge using the powerpc fselNate Begeman2004-10-061-25/+113
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | instruction. Now, rather than emitting the following loop out of bisect: .LBB_main_19: ; no_exit.0.i rlwinm r3, r2, 3, 0, 28 lfdx f1, r3, r27 addis r3, r30, ha16(.CPI_main_1-"L00000$pb") lfd f2, lo16(.CPI_main_1-"L00000$pb")(r3) fsub f2, f2, f1 addis r3, r30, ha16(.CPI_main_1-"L00000$pb") lfd f4, lo16(.CPI_main_1-"L00000$pb")(r3) fcmpu cr0, f1, f4 bge .LBB_main_64 ; no_exit.0.i .LBB_main_63: ; no_exit.0.i b .LBB_main_65 ; no_exit.0.i .LBB_main_64: ; no_exit.0.i fmr f2, f1 .LBB_main_65: ; no_exit.0.i addi r3, r2, 1 rlwinm r3, r3, 3, 0, 28 lfdx f1, r3, r27 addis r3, r30, ha16(.CPI_main_1-"L00000$pb") lfd f4, lo16(.CPI_main_1-"L00000$pb")(r3) fsub f4, f4, f1 addis r3, r30, ha16(.CPI_main_1-"L00000$pb") lfd f5, lo16(.CPI_main_1-"L00000$pb")(r3) fcmpu cr0, f1, f5 bge .LBB_main_67 ; no_exit.0.i .LBB_main_66: ; no_exit.0.i b .LBB_main_68 ; no_exit.0.i .LBB_main_67: ; no_exit.0.i fmr f4, f1 .LBB_main_68: ; no_exit.0.i fadd f1, f2, f4 addis r3, r30, ha16(.CPI_main_2-"L00000$pb") lfd f2, lo16(.CPI_main_2-"L00000$pb")(r3) fmul f1, f1, f2 rlwinm r3, r2, 3, 0, 28 lfdx f2, r3, r28 fadd f4, f2, f1 fcmpu cr0, f4, f0 bgt .LBB_main_70 ; no_exit.0.i .LBB_main_69: ; no_exit.0.i b .LBB_main_71 ; no_exit.0.i .LBB_main_70: ; no_exit.0.i fmr f0, f4 .LBB_main_71: ; no_exit.0.i fsub f1, f2, f1 addi r2, r2, -1 fcmpu cr0, f1, f3 blt .LBB_main_73 ; no_exit.0.i .LBB_main_72: ; no_exit.0.i b .LBB_main_74 ; no_exit.0.i .LBB_main_73: ; no_exit.0.i fmr f3, f1 .LBB_main_74: ; no_exit.0.i cmpwi cr0, r2, -1 fmr f16, f0 fmr f17, f3 bgt .LBB_main_19 ; no_exit.0.i We emit this instead: .LBB_main_19: ; no_exit.0.i rlwinm r3, r2, 3, 0, 28 lfdx f1, r3, r27 addis r3, r30, ha16(.CPI_main_1-"L00000$pb") lfd f2, lo16(.CPI_main_1-"L00000$pb")(r3) fsub f2, f2, f1 fsel f1, f1, f1, f2 addi r3, r2, 1 rlwinm r3, r3, 3, 0, 28 lfdx f2, r3, r27 addis r3, r30, ha16(.CPI_main_1-"L00000$pb") lfd f4, lo16(.CPI_main_1-"L00000$pb")(r3) fsub f4, f4, f2 fsel f2, f2, f2, f4 fadd f1, f1, f2 addis r3, r30, ha16(.CPI_main_2-"L00000$pb") lfd f2, lo16(.CPI_main_2-"L00000$pb")(r3) fmul f1, f1, f2 rlwinm r3, r2, 3, 0, 28 lfdx f2, r3, r28 fadd f4, f2, f1 fsub f5, f0, f4 fsel f0, f5, f0, f4 fsub f1, f2, f1 addi r2, r2, -1 fsub f2, f1, f3 fsel f3, f2, f3, f1 cmpwi cr0, r2, -1 fmr f16, f0 fmr f17, f3 bgt .LBB_main_19 ; no_exit.0.i llvm-svn: 16764
* Generate better code by being far less clever when it comes to the select ↵Nate Begeman2004-09-291-7/+17
| | | | | | instruction. Don't create overlapping register lifetimes llvm-svn: 16580
* improve Type::BoolTy codegen by eliminating unnecessary clears and sign extendsNate Begeman2004-09-291-1/+8
| | | | llvm-svn: 16578
* To go along with sabre's improved InstCombining, improve recognition ofNate Begeman2004-09-291-21/+9
| | | | | | | | | | | | | | | integers that we can use as immediate values in instructions. Example from yacr2: - lis r10, -1 - ori r10, r10, 65535 - add r28, r28, r10 + addi r28, r28, -1 addi r7, r7, 1 addi r9, r9, 1 b .LBB_main_9 ; loopentry.1.i214 llvm-svn: 16566
* Correct some BuildMI arguments for the upcoming simple schedulerNate Begeman2004-09-273-3/+3
| | | | llvm-svn: 16519
* Fix the last of the major PPC GEP folding deficiencies. This will allowNate Begeman2004-09-231-178/+163
| | | | | | | | the ISel to use indexed and non-zero immediate offsets for GEPs that have more than one use. This is common for instruction sequences such as a load followed by a modify and store to the same address. llvm-svn: 16493
* add optimized code sequences for setcc x, 0Nate Begeman2004-09-223-7/+96
| | | | llvm-svn: 16478
* s/ISel/PPC64ISel/ to have unique class names for debugging via gdb because theMisha Brukman2004-09-211-78/+81
| | | | | | C++ front-end in gcc does not mangle classes in anonymous namespaces correctly. llvm-svn: 16471
* s/ISel/PPC32ISel/ to have unique class names for debugging via gdb because theMisha Brukman2004-09-211-87/+90
| | | | | | C++ front-end in gcc does not mangle classes in anonymous namespaces correctly. llvm-svn: 16470
* Revamp the Register class, and allow the use of the RegisterGroup class toChris Lattner2004-09-141-29/+49
| | | | | | | | specify aliases directly in register definitions. Patch contributed by Jason Eckhardt! llvm-svn: 16330
* Add 64 bit divide instructions, and use themNate Begeman2004-09-062-34/+15
| | | | llvm-svn: 16198
* * Change PPC32AsmPrinter => PowerPCAsmPrinter since it is now shared betweenMisha Brukman2004-09-053-13/+59
| | | | | | | | Darwin and AIX and is not 32- or 64-bit specific * Bring back PowerPC.td as a result, to make it use the `PowerPC' class name * Adjust Makefile accordingly llvm-svn: 16174
* Renamed PPC32AsmPrinter.cpp => PowerPCAsmPrinter.cpp as the Darwin and AIX asmMisha Brukman2004-09-051-0/+0
| | | | | | printers are now unified into one file. llvm-svn: 16173
* Include MathExtras.h to fix build breakage, thanks to VladimirNate Begeman2004-09-041-0/+1
| | | | llvm-svn: 16164
* All PPC instructions are now auto-printedNate Begeman2004-09-0410-1014/+562
| | | | | | | 32 and 64 bit AsmWriters unified Darwin and AIX specific features of AsmWriter split out llvm-svn: 16163
* Convert remaining X-Form and Pseudo instructions over to asm writerNate Begeman2004-09-025-83/+81
| | | | llvm-svn: 16142
* Changes For Bug 352Reid Spencer2004-09-019-22/+22
| | | | | | | | Move include/Config and include/Support into include/llvm/Config, include/llvm/ADT and include/llvm/Support. From here on out, all LLVM public header files must be under include/llvm/. llvm-svn: 16137
* convert M and MD form instructions to generated asm writerNate Begeman2004-08-312-20/+41
| | | | llvm-svn: 16121
* Move yet more instructions over to being printed by the generated asm writerNate Begeman2004-08-303-134/+182
| | | | llvm-svn: 16112
* Convert A-Form instructions to auto-generated asm writerNate Begeman2004-08-292-45/+62
| | | | llvm-svn: 16107
* Improvements to int->float cast code for PPC-64Nate Begeman2004-08-293-61/+60
| | | | llvm-svn: 16105
* Implement the following missing functionality in the PPC backend:Nate Begeman2004-08-293-66/+137
| | | | | | | | | cast fp->bool cast ulong->fp algebraic right shift long by non-constant value These changes tested across most of the test suite. Fixes Regression/casts llvm-svn: 16081
* Register sizes are in bits, not bytesNate Begeman2004-08-272-3/+3
| | | | llvm-svn: 16070
* Kill a majority of unnecessary sign extensions for byte loadsNate Begeman2004-08-221-12/+30
| | | | llvm-svn: 15991
* Don't hard code the offset of the saved R31 in functions with frame pointersNate Begeman2004-08-221-1/+2
| | | | llvm-svn: 15990
* Back out branchless SetCC code. While it helped a lot in some cases, itNate Begeman2004-08-211-188/+25
| | | | | | | | hurt a lot in others. Instead, improve branching version of SetCC and Select instructions. The old code will be in CVS should we ever need to dig it up again. llvm-svn: 15979
* Switch from bytes to bits for alignment.Chris Lattner2004-08-212-6/+6
| | | | | | Also, change GPRC for PPC32 to align on 32-bit boundary instead of 64-bit llvm-svn: 15975
* Reduce uses of getRegClassChris Lattner2004-08-212-8/+6
| | | | llvm-svn: 15968
* Fix warningChris Lattner2004-08-211-1/+1
| | | | llvm-svn: 15964
* Move XForm instructions over to the auto-generated asm writerNate Begeman2004-08-213-71/+133
| | | | llvm-svn: 15962
* remove some things from the todo list.Nate Begeman2004-08-201-6/+0
| | | | llvm-svn: 15956
* Do not register ppc64 yet, as it breaks the SparcV9 backendChris Lattner2004-08-201-0/+3
| | | | llvm-svn: 15955
* Implement code to convert SetCC into straight line code where appropriate. ↵Nate Begeman2004-08-202-22/+173
| | | | | | Add necessary instructions for this transformation to the .td file. llvm-svn: 15952
* Fix opcodes being printed in caps (the more general fix may be `AsmWriter')Misha Brukman2004-08-191-1/+1
| | | | llvm-svn: 15932
* Stack space for argument passing is 32 regardless of 32- vs. 64-bit arch.Misha Brukman2004-08-191-6/+6
| | | | | | Thanks to Nate Begeman for pointing this out. llvm-svn: 15930
* LR needs to be saved at 16-byte offset on a 64-bit archMisha Brukman2004-08-192-6/+6
| | | | llvm-svn: 15929
* On 64-bit PowerPC, pointers are 8 bytes, so parameter area offset is 48, not 24Misha Brukman2004-08-191-7/+10
| | | | llvm-svn: 15928
* This PHI has 4 additional operands, not 2.Misha Brukman2004-08-191-1/+1
| | | | llvm-svn: 15926
* Use the appropriate 64-bit register description file.Misha Brukman2004-08-191-1/+1
| | | | llvm-svn: 15922
* Fix more remaining 32-bit vestiges of PowerPCMisha Brukman2004-08-191-6/+2
| | | | llvm-svn: 15919
* Fix another vestige of the 32-bit PowerPC backend.Misha Brukman2004-08-191-3/+1
| | | | llvm-svn: 15918
* Correct character prepended to global symbols ('.'), use Mangler consistentlyMisha Brukman2004-08-191-2/+2
| | | | llvm-svn: 15917
* * Eliminate global base register, r2 is used for that on AIX/PowerPCMisha Brukman2004-08-191-45/+6
| | | | | | * Fix bug from 32-bit PowerPC days of 2-register long split llvm-svn: 15916
* Wrap long lines.Misha Brukman2004-08-191-4/+5
| | | | llvm-svn: 15915
* Convert casts that will have no effect into move instructions.Nate Begeman2004-08-191-4/+22
| | | | llvm-svn: 15914
* Clean up floating point instruction selection.Nate Begeman2004-08-194-110/+30
| | | | | | | | Change int->float cast code to put conversion constants in constant pool. Shorten code sequence for constant pool fp loads. Remove LOADLoDirect/LOADLoIndirect psuedo instructions and tweak asmwriter llvm-svn: 15913
* Rename varChris Lattner2004-08-181-3/+3
| | | | llvm-svn: 15897
* This file is no longer used.Misha Brukman2004-08-171-30/+0
| | | | llvm-svn: 15893
* Start using alignment output routines from AsmPrinter.Chris Lattner2004-08-171-12/+12
| | | | | | | | Changes to make this more similar to the X86 asmprinter Fix overalignment of globals. llvm-svn: 15891
* Print comments with ;Chris Lattner2004-08-171-0/+1
| | | | llvm-svn: 15881
OpenPOWER on IntegriCloud