summaryrefslogtreecommitdiffstats
path: root/llvm
Commit message (Collapse)AuthorAgeFilesLines
* Improve and elimination. On PPC, for:Chris Lattner2005-04-211-6/+26
| | | | | | | | | | | | | | | | | | | | | | | | | bool %test(int %X) { %Y = and int %X, 8 %Z = setne int %Y, 0 ret bool %Z } we now generate this: rlwinm r2, r3, 0, 28, 28 srwi r3, r2, 3 instead of this: rlwinm r2, r3, 0, 28, 28 srwi r2, r2, 3 rlwinm r3, r2, 0, 31, 31 I'll leave it to Nate to get it down to one instruction. :) --------------------------------------------------------------------- llvm-svn: 21391
* Fold (x & 8) != 0 and (x & 8) == 8 into (x & 8) >> 3.Chris Lattner2005-04-211-0/+22
| | | | | | | | | | | | | | | | | | | This turns this PPC code: rlwinm r2, r3, 0, 28, 28 cmpwi cr7, r2, 8 mfcr r2 rlwinm r3, r2, 31, 31, 31 into this: rlwinm r2, r3, 0, 28, 28 srwi r2, r2, 3 rlwinm r3, r2, 0, 31, 31 Next up, nuking the extra and. llvm-svn: 21390
* Instcombine this:Chris Lattner2005-04-211-0/+3
| | | | | | | | | | | | | | | | | %shortcirc_val = select bool %tmp.1, bool true, bool %tmp.4 ; <bool> [#uses=1] %tmp.6 = cast bool %shortcirc_val to int ; <int> [#uses=1] into this: %shortcirc_val = or bool %tmp.1, %tmp.4 ; <bool> [#uses=1] %tmp.6 = cast bool %shortcirc_val to int ; <int> [#uses=1] not this: %tmp.4.cast = cast bool %tmp.4 to int ; <int> [#uses=1] %tmp.6 = select bool %tmp.1, int 1, int %tmp.4.cast ; <int> [#uses=1] llvm-svn: 21389
* Teach simplifycfg that setcc is cheap and non-trapping, so that it canChris Lattner2005-04-211-0/+6
| | | | | | | | | | | | | | | | | | | | | | | convert this: %tmp.1 = seteq int %i, 0 ; <bool> [#uses=1] br bool %tmp.1, label %shortcirc_done, label %shortcirc_next shortcirc_next: ; preds = %entry %tmp.4 = seteq int %j, 0 ; <bool> [#uses=1] br label %shortcirc_done shortcirc_done: ; preds = %shortcirc_next, %entry %shortcirc_val = phi bool [ %tmp.4, %shortcirc_next ], [ true, %entry ] ; <bool> [#uses=1] to this: %tmp.1 = seteq int %i, 0 ; <bool> [#uses=1] %tmp.4 = seteq int %j, 0 ; <bool> [#uses=1] %shortcirc_val = select bool %tmp.1, bool true, bool %tmp.4 ; <bool> [#uses=1] ... which is later simplified by instcombine into an or. llvm-svn: 21388
* Fix some broken links, taking care of PR554Chris Lattner2005-04-211-6/+6
| | | | llvm-svn: 21387
* update to match build changes.Chris Lattner2005-04-211-2/+2
| | | | llvm-svn: 21386
* For Bug 543:Reid Spencer2005-04-211-24/+24
| | | | | | | | Standardize the error messages to be in "path: what failed: why" format. Also attempt to use the correct errno to ThrowErrno in situations where the errno value is erased by subsequent system calls. llvm-svn: 21385
* For Bug 543:Reid Spencer2005-04-211-6/+8
| | | | | | | Allow the ThrowErrno function to optionally accept an error number parameter so that callers can specify the error number to be used. llvm-svn: 21384
* Remove trailing whitespace at the end of linesMisha Brukman2005-04-204-41/+41
| | | | llvm-svn: 21380
* Remove trailing whitespace, patch by Markus Oberhumer.Misha Brukman2005-04-202-59/+59
| | | | llvm-svn: 21379
* Add FIXME by Markus Oberhumer from bug 545: not checking for "." in $PATH mayMisha Brukman2005-04-201-0/+2
| | | | | | result in returning executable files that won't be runnable. llvm-svn: 21378
* Do not mark directories as `executable', we only want program filesMisha Brukman2005-04-201-0/+4
| | | | | | Patch by Markus Oberhumer. llvm-svn: 21377
* #include system headers after all LLVM headersMisha Brukman2005-04-201-2/+1
| | | | llvm-svn: 21374
* Eliminate trailing spaces at end-of-lineMisha Brukman2005-04-202-18/+18
| | | | llvm-svn: 21372
* Consistently eschew space between `*' or `&' and function argument nameMisha Brukman2005-04-201-12/+12
| | | | llvm-svn: 21371
* Ignore dangling symlinks in getDirectoryContents()Misha Brukman2005-04-201-3/+8
| | | | | | Thanks to Markus Oberhumer for the patch! llvm-svn: 21370
* Initialize fields mode, uid, and gid.Misha Brukman2005-04-201-0/+6
| | | | | | Patch by Markus Oberhumer. Thanks! llvm-svn: 21369
* Align comments together for consistencyMisha Brukman2005-04-201-1/+1
| | | | llvm-svn: 21368
* * Print commands as we execute them with `-v'Misha Brukman2005-04-203-21/+44
| | | | | | | * Add option `-save-temps' Patch contributed by Markus Oberhumer. llvm-svn: 21367
* Wrap some long lines.Chris Lattner2005-04-191-3/+9
| | | | | | | | Make IPSCCP strip off dead constant exprs that are using functions, making them appear as though their address is taken. This allows us to propagate some more pool descriptors, lowering the overhead of pool alloc. llvm-svn: 21363
* ignore generated filesChris Lattner2005-04-191-0/+4
| | | | llvm-svn: 21362
* fix bogus warningChris Lattner2005-04-191-0/+1
| | | | llvm-svn: 21361
* fix PR549Chris Lattner2005-04-191-1/+3
| | | | llvm-svn: 21360
* Bug fixedChris Lattner2005-04-191-0/+2
| | | | llvm-svn: 21355
* Eliminate a broken transformation, fixing PR548Chris Lattner2005-04-191-4/+2
| | | | llvm-svn: 21354
* Add completely untested support for mtcrf/mfcrf encodingChris Lattner2005-04-191-0/+7
| | | | llvm-svn: 21353
* switch over the rest of the formats that use RC to use isDOTChris Lattner2005-04-192-71/+73
| | | | llvm-svn: 21352
* Convert the XForm instrs and XSForm instruction over to use isDOTChris Lattner2005-04-192-52/+60
| | | | llvm-svn: 21351
* Now that the ppc64 and vmx operands of I are always 0, forward substituteChris Lattner2005-04-191-36/+30
| | | | | | them away. llvm-svn: 21350
* convert over bform and iform instructionsChris Lattner2005-04-192-17/+17
| | | | llvm-svn: 21349
* Convert over DForm and DSForm instructionsChris Lattner2005-04-192-90/+80
| | | | llvm-svn: 21348
* Convert XLForm and XForm instructions over to use PPC64 when appropriate.Chris Lattner2005-04-192-129/+112
| | | | llvm-svn: 21347
* Convert XO XS and XFX forms to use isPPC64Chris Lattner2005-04-192-53/+52
| | | | llvm-svn: 21346
* Turn PPC64 and VMX into classes that can be added to instructions instead ofChris Lattner2005-04-192-39/+40
| | | | | | | bits that must be passed up the inheritance hierarchy. Convert MForm and AForm instructions over llvm-svn: 21345
* Major change to tblgen: instead of resolving values every time a class isChris Lattner2005-04-193-73/+119
| | | | | | | | | | | finished up, only resolve fully when the def is defined. This allows things to be changed and all uses to be propagated through. This implements TableGen/LazyChange.td and fixes TemplateArgRename.td in the process. None of the .td files used in LLVM backends are changed at all by this patch. llvm-svn: 21344
* New testcase for a changing values late and allowing them to propagateChris Lattner2005-04-191-0/+11
| | | | llvm-svn: 21343
* Make this significantly harderChris Lattner2005-04-191-0/+7
| | | | llvm-svn: 21342
* Add a real run lineChris Lattner2005-04-191-1/+1
| | | | llvm-svn: 21341
* fix this testcaseChris Lattner2005-04-191-0/+1
| | | | llvm-svn: 21340
* new testcaseChris Lattner2005-04-191-0/+9
| | | | llvm-svn: 21339
* add a run lineChris Lattner2005-04-191-1/+1
| | | | llvm-svn: 21338
* Tell dj to run the tests in this directoryChris Lattner2005-04-191-1/+1
| | | | llvm-svn: 21337
* implementing shifting of literal integersChris Lattner2005-04-192-0/+16
| | | | llvm-svn: 21336
* Add initial lexer and parser support for shifting values. Every use of thisChris Lattner2005-04-193-0/+29
| | | | | | will lead to it being rejected though. llvm-svn: 21335
* Next round of PPC CR optimizations. For the following code:Nate Begeman2005-04-181-62/+95
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | int %bar(float %a, float %b, float %c, float %d) { entry: %tmp.1 = setlt float %a, %d %tmp.2 = setlt float %b, %d %or = or bool %tmp.1, %tmp.2 %tmp.3 = setgt float %c, %d %tmp.4 = or bool %or, %tmp.3 %tmp.5 = and bool %tmp.4, true %retval = cast bool %tmp.5 to int ret int %retval } We now emit: _bar: .LBB_bar_0: ; entry fcmpu cr0, f1, f4 fcmpu cr1, f2, f4 cror 0, 0, 4 fcmpu cr1, f3, f4 cror 28, 0, 5 mfcr r2 rlwinm r3, r2, 29, 31, 31 blr Instead of: _bar: .LBB_bar_0: ; entry fcmpu cr7, f1, f4 mfcr r2 rlwinm r2, r2, 29, 31, 31 fcmpu cr7, f2, f4 mfcr r3 rlwinm r3, r3, 29, 31, 31 or r2, r2, r3 fcmpu cr7, f3, f4 mfcr r3 rlwinm r3, r3, 30, 31, 31 or r3, r2, r3 blr llvm-svn: 21321
* silence a bogus warningChris Lattner2005-04-181-1/+1
| | | | llvm-svn: 21320
* Fold setcc of MVT::i1 operands into logical operationsChris Lattner2005-04-181-0/+39
| | | | llvm-svn: 21319
* Another minor simplification: handle setcc (zero_extend x), c -> setcc(x, c')Chris Lattner2005-04-181-0/+45
| | | | llvm-svn: 21318
* Another simple xformChris Lattner2005-04-181-0/+8
| | | | llvm-svn: 21317
* Fold:Chris Lattner2005-04-181-0/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | // (X != 0) | (Y != 0) -> (X|Y != 0) // (X == 0) & (Y == 0) -> (X|Y == 0) Compiling this: int %bar(int %a, int %b) { entry: %tmp.1 = setne int %a, 0 %tmp.2 = setne int %b, 0 %tmp.3 = or bool %tmp.1, %tmp.2 %retval = cast bool %tmp.3 to int ret int %retval } to this: _bar: or r2, r3, r4 addic r3, r2, -1 subfe r3, r3, r2 blr instead of: _bar: addic r2, r3, -1 subfe r2, r2, r3 addic r3, r4, -1 subfe r3, r3, r4 or r3, r2, r3 blr llvm-svn: 21316
OpenPOWER on IntegriCloud