summaryrefslogtreecommitdiffstats
path: root/llvm/test/Transforms/SimplifyLibCalls
Commit message (Collapse)AuthorAgeFilesLines
...
* change the objectsize intrinsic signature: add a 3rd parameter to denote the ↵Nuno Lopes2012-05-091-2/+2
| | | | | | | | maximum runtime performance penalty that the user is willing to accept. This commit only adds the parameter. Code taking advantage of it will follow. llvm-svn: 156473
* FileCheckify, un-XFAIL SimplifyLibCalls/floor testJoe Groff2012-04-181-10/+31
| | | | | | Fixes build on MSVC llvm-svn: 154970
* Move win32 SimplifyLibcall test under TransformsJoe Groff2012-04-181-0/+275
| | | | llvm-svn: 154967
* Replace all instances of dg.exp file with lit.local.cfg, since all tests are ↵Eli Bendersky2012-02-162-3/+1
| | | | | | | | run with LIT now and now Dejagnu. dg.exp is no longer needed. Patch reviewed by Daniel Dunbar. It will be followed by additional cleanup patches. llvm-svn: 150664
* Turn cos(-x) into cos(x). Patch by Alexander Malyshev!Nick Lewycky2011-12-271-0/+14
| | | | llvm-svn: 147291
* Give string constants generated by IRBuilder private linkage.Benjamin Kramer2011-12-221-1/+1
| | | | | | Fixes PR11640. llvm-svn: 147144
* Only replace fwrite with fputc, if the return value is unused.Joerg Sonnenberger2011-12-121-0/+13
| | | | llvm-svn: 146411
* Add support for custom names for library functions in TargetLibraryInfo. ↵Eli Friedman2011-11-171-0/+30
| | | | | | | | | | Add a custom name for fwrite and fputs on x86-32 OSX. Make SimplifyLibCalls honor the custom names for fwrite and fputs. Fixes <rdar://problem/9815881>. llvm-svn: 144876
* SimplifyLibCalls: Use IRBuilder.CreateGlobalString when creating a string ↵Benjamin Kramer2011-10-291-2/+3
| | | | | | | | for printf->puts, which correctly sets the unnamed_addr bit on the resulting GlobalVariable. Fixes PR11264. llvm-svn: 143289
* "@string = constant i8 0" is a value i8* string of length zero. Analyze thatNick Lewycky2011-10-201-0/+6
| | | | | | correctly in GetStringLength, fixing PR11181! llvm-svn: 142558
* Fixed quoting on default data layout option.Lang Hames2011-10-171-1/+1
| | | | llvm-svn: 142286
* PR11061: Make simplifylibcalls fold strcmp("", x) correctly.Eli Friedman2011-10-052-44/+124
| | | | | | While I'm here, fix the related issue with strncmp, add some actual tests for strcmp and strncmp, and start using StringRef::compare for constant folding instead of using strcmp/strncmp so that the optimized IR isn't dependent on the host's implementation of strcmp. llvm-svn: 141227
* Stop emitting instructions with the name "tmp" they eat up memory and have ↵Benjamin Kramer2011-09-271-6/+6
| | | | | | | | to be uniqued, without any benefit. If someone prefers %tmp42 to %42, run instnamer. llvm-svn: 140634
* Move "atomic" and "volatile" designations on instructions after the opcodeEli Friedman2011-08-121-11/+11
| | | | | | | | | | of the instruction. Note that this change affects the existing non-atomic load and store instructions; the parser now accepts both forms, and the change is noted in the release notes. llvm-svn: 137527
* rip out a ton of intrinsic modernization logic from AutoUpgrade.cpp, which isChris Lattner2011-06-181-11/+10
| | | | | | | | | for pre-2.9 bitcode files. We keep x86 unaligned loads, movnt, crc32, and the target indep prefetch change. As usual, updating the testsuite is a PITA. llvm-svn: 133337
* Preserve line number information while simplifying libcalls.Devang Patel2011-03-091-0/+24
| | | | llvm-svn: 127362
* Optimize fprintf -> iprintf if there are no floating point argumentsRichard Osborne2011-03-031-0/+21
| | | | | | and siprintf is available on the target. llvm-svn: 126940
* Optimize sprintf -> siprintf if there are no floating point argumentsRichard Osborne2011-03-031-0/+21
| | | | | | and siprintf is available on the target. llvm-svn: 126937
* Optimize printf -> iprintf if there are no floating point argumentsRichard Osborne2011-03-031-0/+29
| | | | | | | and iprintf is available on the target. Currently iprintf is only marked as being available on the XCore. llvm-svn: 126935
* Delete obsolete test.Dan Gohman2011-02-281-46/+0
| | | | llvm-svn: 126680
* SimplifyLibCalls: Add missing legalize check on various printf to puts andDaniel Dunbar2011-02-121-7/+20
| | | | | | putchar transforms, their return values are not compatible. llvm-svn: 125442
* tests: FileCheckizeDaniel Dunbar2011-02-121-3/+5
| | | | llvm-svn: 125441
* Revert r64460. strtol and friends cannot be marked readonly, even withDan Gohman2010-12-171-1/+1
| | | | | | | | | a null endptr argument, because they may write to errno. This fixes a seflhost miscompile observed on Linux targets when TBAA was enabled. llvm-svn: 122014
* Add a puts optimization that converts puts() to putchar('\n').Anders Carlsson2010-11-301-0/+15
| | | | llvm-svn: 120398
* Fix a typo.Anders Carlsson2010-11-301-1/+1
| | | | llvm-svn: 120394
* Rename this test to FPuts.ll since it actually tests fputs.Anders Carlsson2010-11-301-0/+0
| | | | llvm-svn: 120393
* Fix some broken CHECK lines.Benjamin Kramer2010-11-291-1/+1
| | | | llvm-svn: 120332
* test/Transforms/SimplifyLibCalls/floor.ll: Mark as XFAIL:win32 due to lack ↵NAKAMURA Takumi2010-10-281-0/+2
| | | | | | of nearbyintf on MSVC. [PR8466] llvm-svn: 117529
* Add constant folding for strspn and strcspn to SimplifyLibCalls.Benjamin Kramer2010-09-301-0/+41
| | | | llvm-svn: 115116
* Add strpbrk folding to SimplifyLibCalls.Benjamin Kramer2010-09-291-0/+25
| | | | llvm-svn: 115111
* Simplify the loop in StrChrOptimizer. FileCheckize test.Benjamin Kramer2010-09-291-14/+14
| | | | llvm-svn: 115095
* Teach SimplifyLibCalls how to optimize strrchr.Benjamin Kramer2010-09-291-0/+23
| | | | llvm-svn: 115091
* Make sure that simplify libcalls does not replace a call with one callingRafael Espindola2010-06-161-0/+16
| | | | | | convention with a new call with a different calling convention. llvm-svn: 106134
* simplify-libcalls: fold strncmp(x, y, 1) -> memcmp(x, y, 1)Benjamin Kramer2010-06-161-0/+7
| | | | | | | The memcmp will be optimized further and even the pathological case 'strstr(x, "x") == x' generates optimal code now. llvm-svn: 106097
* simplify-libcalls: fold strstr(a, b) == a -> strncmp(a, b, strlen(b)) == 0Benjamin Kramer2010-06-151-0/+12
| | | | llvm-svn: 106047
* The memcpy intrinsic only takes i8* for %src and %dst, so cast them to thatNick Lewycky2010-05-311-0/+20
| | | | | | first. Fixes PR7265. llvm-svn: 105206
* Properly promote operands when optimizing a single-character memcmp.Benjamin Kramer2010-05-251-1/+13
| | | | llvm-svn: 104648
* Reapply address space patch after fixing an issue in MemCopyOptimizer.Mon P Wang2010-04-041-1/+1
| | | | | | | Added support for address spaces and added a isVolatile field to memcpy, memmove, and memset, e.g., llvm.memcpy.i32(i8*, i8*, i32, i32) -> llvm.memcpy.p0i8.p0i8.i32(i8*, i8*, i32, i32, i1) llvm-svn: 100304
* Revert r100191 since it breaks objc in clang Mon P Wang2010-04-021-1/+1
| | | | llvm-svn: 100199
* Reapply address space patch after fixing an issue in MemCopyOptimizer.Mon P Wang2010-04-021-1/+1
| | | | | | | Added support for address spaces and added a isVolatile field to memcpy, memmove, and memset, e.g., llvm.memcpy.i32(i8*, i8*, i32, i32) -> llvm.memcpy.p0i8.p0i8.i32(i8*, i8*, i32, i32, i1) llvm-svn: 100191
* Revert Mon Ping's change 99928, since it broke all the llvm-gcc buildbots.Bob Wilson2010-03-301-1/+1
| | | | llvm-svn: 99948
* Added support for address spaces and added a isVolatile field to memcpy, ↵Mon P Wang2010-03-301-1/+1
| | | | | | | | | memmove, and memset, e.g., llvm.memcpy.i32(i8*, i8*, i32, i32) -> llvm.memcpy.p0i8.p0i8.i32(i8*, i8*, i32, i32, i1) A update of langref will occur in a subsequent checkin. llvm-svn: 99928
* Teach simplify libcall to transform __strcpy_chk to __memcpy_chk to enable ↵Evan Cheng2010-03-231-20/+27
| | | | | | optimizations down stream. llvm-svn: 99282
* Migrate _chk call lowering from SimplifyLibCalls to InstCombine. StubEric Christopher2010-03-062-30/+0
| | | | | | | | out the remainder of the calls that we should lower in some way and move the tests to the new correct directory. Fix up tests that are now optimized more than they were before by -instcombine. llvm-svn: 97875
* Safely turn memset_chk etc. to non-chk variant if the known object size is ↵Evan Cheng2010-03-051-0/+18
| | | | | | >= memset / memcpy / memmove size. llvm-svn: 97828
* Recommit this, looks like it wasn't the cause.Eric Christopher2010-02-031-0/+12
| | | | llvm-svn: 95165
* Hopefully temporarily revert this.Eric Christopher2010-02-021-12/+0
| | | | llvm-svn: 95154
* Re-add strcmp and known size object size checking optimization.Eric Christopher2010-02-021-0/+12
| | | | | | Passed bootstrap and nightly test run here. llvm-svn: 95145
* Revert my last couple of patches. They appear to have broken bison.Eric Christopher2010-01-291-12/+0
| | | | llvm-svn: 94841
* Make strcpy_chk lower to strcpy if we have a safe size.Eric Christopher2010-01-291-0/+12
| | | | llvm-svn: 94783
OpenPOWER on IntegriCloud