summaryrefslogtreecommitdiffstats
path: root/llvm/test/Transforms
Commit message (Collapse)AuthorAgeFilesLines
* CVP: If we have a PHI with an incoming select, try to skip the select.Benjamin Kramer2013-02-241-0/+20
| | | | | | | | | | This is a common pattern with dyn_cast and similar constructs, when the PHI no longer depends on the select it can often be turned into a simpler construct or even get hoisted out of the loop. PR15340. llvm-svn: 175995
* Fix invalid IR in test, missing incoming value for PHI node.Benjamin Kramer2013-02-241-1/+1
| | | | llvm-svn: 175994
* Some more tests for the global structure vectorizerRenato Golin2013-02-231-20/+596
| | | | llvm-svn: 175964
* More tests to global struct vectorizerRenato Golin2013-02-221-0/+146
| | | | llvm-svn: 175898
* Use references to attribute groups on the call/invoke instructions.Bill Wendling2013-02-2236-139/+227
| | | | | | | Listing all of the attributes for the callee of a call/invoke instruction is way too much and makes the IR unreadable. Use references to attributes instead. llvm-svn: 175877
* Allow GlobalValues to vectorize with AliasAnalysisRenato Golin2013-02-211-0/+356
| | | | | | | | | | | | | | | | | | | | | Storing the load/store instructions with the values and inspect them using Alias Analysis to make sure they don't alias, since the GEP pointer operand doesn't take the offset into account. Trying hard to not add any extra cost to loads and stores that don't overlap on global values, AA is *only* calculated if all of the previous attempts failed. Using biggest vector register size as the stride for the vectorization access, as we're being conservative and the cost model (which calculates the real vectorization factor) is only run after the legalization phase. We might re-think this relationship in the future, but for now, I'd rather be safe than sorry. llvm-svn: 175818
* Modify the LLVM assembly output so that it uses references to represent ↵Bill Wendling2013-02-2014-50/+84
| | | | | | | | | | | function attributes. This makes the LLVM assembly look better. E.g.: define void @foo() #0 { ret void } attributes #0 = { nounwind noinline ssp } llvm-svn: 175605
* Fix a bug in mayHaveSideEffects. Functions that do not return are now ↵Nadav Rotem2013-02-191-0/+18
| | | | | | | | considered as instructions with side effects. rdar://13227456 llvm-svn: 175553
* Temporarily revert r175470 for more review.Bill Wendling2013-02-191-23/+0
| | | | llvm-svn: 175476
* Check to see if the 'no-builtin' attribute is set before simplifying a ↵Bill Wendling2013-02-181-0/+23
| | | | | | library call. llvm-svn: 175470
* AArch64: adjust tests which rely on a default JITTim Northover2013-02-181-1/+1
| | | | | | | | | | | | | Profiling tests *do* need a JIT. They'll pass if a cross-compiler targetting AArch64 by default has been built, but fail if a native AArch64 compiler has been build. Therefore XFAIL is inappropriate and we mark them unsupported. ExecutionEngine tests are JIT by definition, they should also be unsupported. Transforms/LICM only uses the interpreter to check the output is still sane after optimisation. It can be switched to use an interpreter. llvm-svn: 175433
* BBVectorize: Fix an invalid reference bugHal Finkel2013-02-171-0/+98
| | | | | | | | | | | | | | This fixes PR15289. This bug was introduced (recently) in r175215; collecting all std::vector references for candidate pairs to delete at once is invalid because subsequent lookups in the owning DenseMap could invalidate the references. bugpoint was able to reduce a useful test case. Unfortunately, because whether or not this asserts depends on memory layout, this test case will sometimes appear to produce valid output. Nevertheless, running under valgrind will reveal the error. llvm-svn: 175397
* The transform is:Bill Wendling2013-02-162-23/+12
| | | | | | | | | | | | | | | (or (bool?A:B),(bool?C:D)) --> (bool?(or A,C):(or B,D)) By the time the OR is visited, both the SELECTs have been visited and not optimized and the OR itself hasn't been transformed so we do this transform in the hopes that the new ORs will be optimized. The transform is explicitly disabled for vector-selects until "codegen matures to handle them better". Patch by Muhammad Tauqir! llvm-svn: 175380
* Forgot to 'svn add' the LoopVectorizer tests for the new parallel loop ↵Pekka Jaaskelainen2013-02-152-0/+166
| | | | | | metadata, sorry. llvm-svn: 175311
* Teach InstCombine to work with smaller legal types in icmp (shl %v, C1), C2Arnaud A. de Grandmaison2013-02-152-3/+42
| | | | | | | | | It enables to work with a smaller constant, which is target friendly for those which can compare to immediates. It also avoids inserting a shift in favor of a trunc, which can be free on some targets. This used to work until LLVM-3.1, but regressed with the 3.2 release. llvm-svn: 175270
* Simplify the 'operator<' for the attribute object.Bill Wendling2013-02-151-2/+2
| | | | llvm-svn: 175252
* Revert "Fix testcase for attribute ordering."Anna Zaks2013-02-151-1/+1
| | | | | | This reverts commit 58f20a3cbfca7384fe5e25e095f18572736a4792. llvm-svn: 175249
* Revert "Fix testcase for attribute ordering."Anna Zaks2013-02-151-1/+1
| | | | | | This reverts commit 997c6516ca161073a1d516ebca7c0ca7722f64e2. llvm-svn: 175248
* Fix testcase for attribute ordering.Bill Wendling2013-02-151-1/+1
| | | | llvm-svn: 175238
* Fix testcase for attribute ordering.Bill Wendling2013-02-151-1/+1
| | | | llvm-svn: 175236
* Teach the DataLayout aware constant folder to be much more aggressive towardsNick Lewycky2013-02-141-0/+12
| | | | | | 'and' instructions. This is a pattern that shows up a lot in ubsan binaries. llvm-svn: 175128
* s/grep/FileCheck/ in some testsEli Bendersky2013-02-131-2/+3
| | | | llvm-svn: 175093
* Optimization: bitcast (<1 x ...> insertelement ..., X, ...) to ... ==> ↵Michael Ilseman2013-02-111-1/+7
| | | | | | bitcast X to ... llvm-svn: 174905
* Remove trailing whitespaceMichael Ilseman2013-02-111-7/+8
| | | | llvm-svn: 174903
* FileCheck-ize the tests.Bill Wendling2013-02-115-27/+39
| | | | llvm-svn: 174865
* LSR IVChain improvement.Andrew Trick2013-02-092-20/+94
| | | | | | | | | Handle chains in which the same offset is used for both loads and stores to the same array. Fixes rdar://11410078. llvm-svn: 174789
* [SimplifyLibCalls] Library call simplification doen't work if the call site Chad Rosier2013-02-081-0/+48
| | | | | | | | isn't using the default calling convention. However, if the transformation is from a call to inline IR, then the calling convention doesn't matter. rdar://13157990 llvm-svn: 174724
* Revert "Have InstCombine call SipmlifyCall when handling calls. Test case ↵Andrew Trick2013-02-081-14/+2
| | | | | | | | | | included." This reverts commit 3854a5d90fee52af1065edbed34521fff6cdc18d. This causes a clang unit test to hang: vtable-available-externally.cpp. llvm-svn: 174692
* Have InstCombine call SipmlifyCall when handling calls. Test case included.Michael Ilseman2013-02-071-2/+14
| | | | llvm-svn: 174675
* Identify and simplify idempotent intrinsics. Test case included.Michael Ilseman2013-02-071-0/+51
| | | | llvm-svn: 174650
* Remove this testcase until I can figure out how to properly conditionalize it.Owen Anderson2013-02-071-43/+0
| | | | llvm-svn: 174591
* Another attempt at getting the XFAIL line right for this test.Owen Anderson2013-02-071-1/+1
| | | | llvm-svn: 174588
* Preserve fast-math flags after reassociation and commutation. Update test casesMichael Ilseman2013-02-071-4/+4
| | | | llvm-svn: 174571
* whitespaceMichael Ilseman2013-02-071-12/+12
| | | | llvm-svn: 174569
* Fix CMake detection of various cmath functions, and XFAIL the test on ↵Owen Anderson2013-02-071-0/+1
| | | | | | platforms that are known to be missing them. llvm-svn: 174564
* Signficantly generalize our ability to constant fold floating point ↵Owen Anderson2013-02-061-0/+42
| | | | | | intrinsics, including ones on half types. llvm-svn: 174555
* InstCombine: Fix and simplify the inttoptr side too.Benjamin Kramer2013-02-051-0/+16
| | | | llvm-svn: 174438
* Added missing newline to end of test case.Michael Gottesman2013-02-051-1/+1
| | | | llvm-svn: 174433
* InstCombine: Harden code to work with vectors of pointers and simplify it a bit.Benjamin Kramer2013-02-051-0/+15
| | | | | | Found by running instcombine on a fabricated test case for the constant folder. llvm-svn: 174430
* ConstantFolding: Fix a crash when encoutering a truncating inttoptr.Benjamin Kramer2013-02-051-0/+19
| | | | | | This was introduced in r173293. llvm-svn: 174424
* Formatting.NAKAMURA Takumi2013-02-051-1/+1
| | | | llvm-svn: 174380
* llvm/test/Transforms/LoopVectorize/X86/vector_ptr_load_store.ll: "-debug" ↵NAKAMURA Takumi2013-02-051-0/+1
| | | | | | requires +Asserts. llvm-svn: 174379
* Loop Vectorizer: Handle pointer stores/loads in getWidestType()Arnold Schwaighofer2013-02-051-0/+149
| | | | | | | | | | | | | | | | | In the loop vectorizer cost model, we used to ignore stores/loads of a pointer type when computing the widest type within a loop. This meant that if we had only stores/loads of pointers in a loop we would return a widest type of 8bits (instead of 32 or 64 bit) and therefore a vector factor that was too big. Now, if we see a consecutive store/load of pointers we use the size of a pointer (from data layout). This problem occured in SingleSource/Benchmarks/Shootout-C++/hash.cpp (reduced test case is the first test in vector_ptr_load_store.ll). radar://13139343 llvm-svn: 174377
* Add code to GlobalVariable.h so that global variables marked asMichael Gottesman2013-02-051-0/+35
| | | | | | | | | externally_initialized return false for hasDefiniteInitializer and hasUniqueInitializer. rdar://12580965. llvm-svn: 174345
* Remove the (apparently) unnecessary debug info metadata indirection.David Blaikie2013-02-021-5/+3
| | | | | | | | | | The main lists of debug info metadata attached to the compile_unit had an extra layer of metadata nodes they went through for no apparent reason. This patch removes that (& still passes just as much of the GDB 7.5 test suite). If anyone can show evidence as to why these extra metadata nodes are there I'm open to reverting this patch & documenting why they're there. llvm-svn: 174266
* Add a testcase for some past-the-end address subtleties.Dan Gohman2013-02-011-0/+77
| | | | llvm-svn: 174210
* InstSimplify: stripAndComputeConstantOffsets can be called with vectors of ↵Benjamin Kramer2013-02-011-0/+11
| | | | | | | | | | pointers too. Prepare it for vectors of pointers and handle simple cases. We don't handle complicated cases because accumulateConstantOffset bails on pointer vectors. Fixes selfhost on i386. llvm-svn: 174179
* Revert r174152. The shift amount may overflow and in that case this ↵Nadav Rotem2013-02-011-20/+0
| | | | | | transformation is illegal. llvm-svn: 174156
* Optimize shift lefts of a constant by a value plus constant into a single shift.Nadav Rotem2013-02-011-0/+20
| | | | llvm-svn: 174152
* Rewrite instsimplify's handling if icmp on pointer values to remove theDan Gohman2013-02-011-0/+22
| | | | | | | | | | | | remaining use of AliasAnalysis concepts such as isIdentifiedObject to prove pointer inequality. @external_compare in test/Transforms/InstSimplify/compare.ll shows a simple case where a noalias argument can be equal to a global variable address, and while AliasAnalysis can get away with saying that these pointers don't alias, instsimplify cannot say that they are not equal. llvm-svn: 174122
OpenPOWER on IntegriCloud