aboutsummaryrefslogtreecommitdiffstats
path: root/test
Commit message (Collapse)AuthorAgeFilesLines
* Remove an orthogonal transformation of the selection condition from my most ↵Christopher Lamb2007-12-181-10/+1
| | | | | | recent submission. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45169 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix PR1872: SrcValue and SrcValueOffset should not be used to compute load / ↵Evan Cheng2007-12-181-0/+28
| | | | | | store node id. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45167 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix typos.Christopher Lamb2007-12-181-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45159 91177308-0d34-0410-b5e6-96231b3b80d8
* Fold certain additions through selects (and their compares) so as to ↵Christopher Lamb2007-12-181-0/+38
| | | | | | | | | eliminate subtractions. This code is often produced by the SMAX expansion in SCEV. This implements test/Transforms/InstCombine/2007-12-18-AddSelCmpSub.ll git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45158 91177308-0d34-0410-b5e6-96231b3b80d8
* FIX for PR1799: When a load is unfolded from an instruction, check if it is ↵Evan Cheng2007-12-181-0/+35
| | | | | | a new node. If not, do not create a new SUnit. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45157 91177308-0d34-0410-b5e6-96231b3b80d8
* Don't forget to print address space qualifiers when printing out the type ↵Christopher Lamb2007-12-181-1/+1
| | | | | | table! Thanks to Gordon Henriksen for pointing this out. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45147 91177308-0d34-0410-b5e6-96231b3b80d8
* Testcase for preceding FE fixDale Johannesen2007-12-181-0/+18
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45144 91177308-0d34-0410-b5e6-96231b3b80d8
* i32 immediate constant test case for CellSPUScott Michel2007-12-171-0/+70
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45134 91177308-0d34-0410-b5e6-96231b3b80d8
* Bring back int_x86_sse2_movl_dq intrinsic for backward compatibility. Make sureEvan Cheng2007-12-172-0/+2
| | | | | | | it's auto-upgraded to a shufflevector instruction. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45131 91177308-0d34-0410-b5e6-96231b3b80d8
* - Restore some i8 functionality in CellSPUScott Michel2007-12-172-8/+133
| | | | | | | - New test case: nand.ll git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45130 91177308-0d34-0410-b5e6-96231b3b80d8
* Make invokes of inline asm legal. Teach codegenDuncan Sands2007-12-172-1/+16
| | | | | | | | | how to lower them (with no attempt made to be efficient, since they should only occur for unoptimized code). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45108 91177308-0d34-0410-b5e6-96231b3b80d8
* Disabling a RUN line that's broken until addrspace roundtripsGordon Henriksen2007-12-171-1/+1
| | | | | | through llvm-as|llvm-dis. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45097 91177308-0d34-0410-b5e6-96231b3b80d8
* C and Ocaml bindings for address spaces, for that burgeoning marketGordon Henriksen2007-12-171-7/+18
| | | | | | for Ocaml-based compilers targeting embedded devices. :) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45096 91177308-0d34-0410-b5e6-96231b3b80d8
* Make instcombine promote inline asm calls to 'nounwind'Duncan Sands2007-12-163-1/+11
| | | | | | | | | | | | | | calls. Remove special casing of inline asm from the inliner. There is a potential problem: the verifier rejects invokes of inline asm (not sure why). If an asm call is not marked "nounwind" in some .ll, and instcombine is not run, but the inliner is run, then an illegal module will be created. This is bad but I'm not sure what the best approach is. I'm tempted to remove the check in the verifier... git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45073 91177308-0d34-0410-b5e6-96231b3b80d8
* Make better use of instructions that clear high bits; fix various 2-wide ↵Evan Cheng2007-12-154-2/+126
| | | | | | shuffle bugs. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45058 91177308-0d34-0410-b5e6-96231b3b80d8
* Start committing working test cases for CellSPU.Scott Michel2007-12-151-0/+270
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45050 91177308-0d34-0410-b5e6-96231b3b80d8
* Teach the interpreter to read and write memory in theDuncan Sands2007-12-142-0/+162
| | | | | | | | | | | endianness of the target not of the host. Done by the simple expedient of reversing bytes for primitive types if the host and target endianness don't match. This is correct for integer and pointer types. I don't know if it is correct for floating point types. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45039 91177308-0d34-0410-b5e6-96231b3b80d8
* Don't redirect stderr when it isn't needed.Dan Gohman2007-12-141-5/+5
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45033 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix ctlz and cttz. llvm definition requires them to return number of bits in ↵Evan Cheng2007-12-141-1/+11
| | | | | | of the src type when value is zero. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45029 91177308-0d34-0410-b5e6-96231b3b80d8
* All MMX shift instructions took a <2 x i32> vector as the shift amount ↵Anders Carlsson2007-12-141-0/+29
| | | | | | parameter. Change this to be <1 x i64> instead, which matches the assembler instruction. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45027 91177308-0d34-0410-b5e6-96231b3b80d8
* Implement ctlz and cttz with bsr and bsf.Evan Cheng2007-12-141-0/+16
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45024 91177308-0d34-0410-b5e6-96231b3b80d8
* Be extra careful with extension use optimation. Now turned on by default.Evan Cheng2007-12-131-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44981 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove this testcase as it will always fail onZhou Sheng2007-12-131-54/+0
| | | | | | | platform like Darwin. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44977 91177308-0d34-0410-b5e6-96231b3b80d8
* Fold some and + shift in x86 addressing mode.Evan Cheng2007-12-131-0/+21
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44970 91177308-0d34-0410-b5e6-96231b3b80d8
* Implicit def instructions, e.g. X86::IMPLICIT_DEF_GR32, are always ↵Evan Cheng2007-12-121-0/+680
| | | | | | re-materializable and they should not be spilled. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44960 91177308-0d34-0410-b5e6-96231b3b80d8
* Allow vector integer constants to be created withDan Gohman2007-12-121-0/+18
| | | | | | | | | SelectionDAG::getConstant, in the same way as vector floating-point constants. This allows the legalize expansion code for @llvm.ctpop and friends to be usable with vector types. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44954 91177308-0d34-0410-b5e6-96231b3b80d8
* 1. "Upgrage" comments.Wojciech Matyjewicz2007-12-121-0/+10
| | | | | | | | | | | | | | | | 2. Using zero-extended value of Scale and unsigned division is safe provided that Scale doesn't have the sign bit set. Previously these 2 instructions: %p = bitcast [100 x {i8,i8,i8}]* %x to i8* %q = getelementptr i8* %p, i32 -4 were combined into: %q = getelementptr [100 x { i8, i8, i8 }]* %x, i32 0, i32 1431655764, i32 0 what was incorrect. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44936 91177308-0d34-0410-b5e6-96231b3b80d8
* Implement part of review feedback for address spaces.Christopher Lamb2007-12-121-2/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44933 91177308-0d34-0410-b5e6-96231b3b80d8
* Use shuffles to implement insert_vector_elt for i32, i64, f32, and f64.Evan Cheng2007-12-124-28/+40
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44929 91177308-0d34-0410-b5e6-96231b3b80d8
* Add a test case for -optimize-ext-uses.Evan Cheng2007-12-121-0/+19
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44928 91177308-0d34-0410-b5e6-96231b3b80d8
* Lower a build_vector with all constants into a constpool load unless it can ↵Evan Cheng2007-12-121-3/+10
| | | | | | be done with a move to low part. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44921 91177308-0d34-0410-b5e6-96231b3b80d8
* Fixed PR1629.Zhou Sheng2007-12-121-0/+54
| | | | | | | | Make lli interpreter correctly call external functions sin()/cos(), __cxa_guard_acquire() and __cxa_guard_release(). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44910 91177308-0d34-0410-b5e6-96231b3b80d8
* Add (very basic) bindings for ModuleProvider.Gordon Henriksen2007-12-121-0/+9
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44899 91177308-0d34-0410-b5e6-96231b3b80d8
* Rename these tests to use the appropriate suffixes.Dan Gohman2007-12-112-0/+0
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44867 91177308-0d34-0410-b5e6-96231b3b80d8
* Use not instead of ignore when an exit status is expected to alwaysDan Gohman2007-12-117-8/+8
| | | | | | | be non-zero. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44866 91177308-0d34-0410-b5e6-96231b3b80d8
* Don't redirect stderr when it isn't needed.Dan Gohman2007-12-112-2/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44865 91177308-0d34-0410-b5e6-96231b3b80d8
* Implement address space attribute for LLVM pointer types. Address spaces are Christopher Lamb2007-12-111-0/+25
| | | | | | | | | | | | | | | | | | regions of memory that have a target specific relationship, as described in the Embedded C Technical Report. This also implements the 2007-12-11-AddressSpaces test, which demonstrates how address space attributes can be used in LLVM IR. In addition, this patch changes the bitcode signature for stores (in a backwards compatible manner), such that the pointer type, rather than the pointee type, is encoded. This permits type information in the pointer (e.g. address space) to be preserved for stores. LangRef updates are forthcoming. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44858 91177308-0d34-0410-b5e6-96231b3b80d8
* Implement constant folding if vector<->vector bitcasts where the numberChris Lattner2007-12-111-0/+33
| | | | | | | | of source/dest elements changes. This implements test/Transforms/InstCombine/bitcast-vector-fold.ll git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44855 91177308-0d34-0410-b5e6-96231b3b80d8
* - Improved v8i16 shuffle lowering. It now uses pshuflw and pshufhw as much asEvan Cheng2007-12-112-24/+36
| | | | | | | | | | possible before resorting to pextrw and pinsrw. - Better codegen for v4i32 shuffles masquerading as v8i16 or v16i8 shuffles. - Improves (i16 extract_vector_element 0) codegen by recognizing (i32 extract_vector_element 0) does not require a pextrw. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44836 91177308-0d34-0410-b5e6-96231b3b80d8
* Adding Ocaml bindings for the bitreader as requested by SarahGordon Henriksen2007-12-111-0/+23
| | | | | | | | | | | | | | | | | | | | Thompson. Usage should be something like this: open Llvm open Llvm_bitreader match read_bitcode_file fn with | Bitreader_failure msg -> prerr_endline msg | Bitreader_success m -> ...; dispose_module m Compile with: ocamlc llvm.cma llvm_bitreader.cma ocamlopt llvm.cmxa llvm_bitreader.cmxa git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44824 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix PR1850 by removing an unsafe transformation from VMCore/ConstantFold.cpp.Chris Lattner2007-12-102-3/+9
| | | | | | | | | Reimplement the xform in Analysis/ConstantFolding.cpp where we can use targetdata to validate that it is safe. While I'm in there, fix some const correctness issues and generalize the interface to the "operand folder". git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44817 91177308-0d34-0410-b5e6-96231b3b80d8
* Make PruneEH update the nounwind/noreturn attributesDuncan Sands2007-12-103-27/+27
| | | | | | | on functions as it calculates them. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44802 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix PR1836: in the interpreter, read and write apintsDuncan Sands2007-12-101-0/+19
| | | | | | | | | | | | | | | | | using the minimum possible number of bytes. For little endian targets run on little endian machines, apints are stored in memory from LSB to MSB as before. For big endian targets on big endian machines they are stored from MSB to LSB which wasn't always the case before (if the target and host endianness doesn't match values are stored according to the host's endianness). Doing this requires knowing the endianness of the host, which is determined when configuring - thanks go to Anton for this. Only having access to little endian machines I was unable to properly test the big endian part, which is also the most complicated... git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44796 91177308-0d34-0410-b5e6-96231b3b80d8
* Improve branch folding by recgonizing that explict successor relationships ↵Christopher Lamb2007-12-101-3/+1
| | | | | | impact the value of fall-through choices. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44785 91177308-0d34-0410-b5e6-96231b3b80d8
* Adding a collector name attribute to Function in the IR. These Gordon Henriksen2007-12-103-4/+29
| | | | | | | | | | | | | | | | | | | | | methods are new to Function: bool hasCollector() const; const std::string &getCollector() const; void setCollector(const std::string &); void clearCollector(); The assembly representation is as such: define void @f() gc "shadow-stack" { ... The implementation uses an on-the-side table to map Functions to collector names, such that there is no overhead. A StringPool is further used to unique collector names, which are extremely likely to be unique per process. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44769 91177308-0d34-0410-b5e6-96231b3b80d8
* Upgrading this test to 2.0 .ll syntax.Gordon Henriksen2007-12-091-28/+27
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44738 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix PR1782, patch by Wojtek Matyjewicz!Chris Lattner2007-12-091-0/+31
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44733 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix a significant code quality regression I introduced on PPC64 quite Chris Lattner2007-12-081-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | a while ago. We now produce: _foo: mflr r0 std r0, 16(r1) ld r2, 16(r1) std r2, 0(r3) ld r0, 16(r1) mtlr r0 blr instead of: _foo: mflr r0 std r0, 16(r1) lis r0, 0 ori r0, r0, 16 ldx r2, r1, r0 std r2, 0(r3) ld r0, 16(r1) mtlr r0 blr for: void foo(void **X) { *X = __builtin_return_address(0); } on ppc64. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44701 91177308-0d34-0410-b5e6-96231b3b80d8
* implement __builtin_return_addr(0) on ppc.Chris Lattner2007-12-081-0/+14
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44700 91177308-0d34-0410-b5e6-96231b3b80d8
* Much improved v8i16 shuffles. (Step 1).Evan Cheng2007-12-072-9/+37
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44676 91177308-0d34-0410-b5e6-96231b3b80d8