summaryrefslogtreecommitdiffstats
path: root/llvm/test
Commit message (Collapse)AuthorAgeFilesLines
* test/CodeGen/X86/negative-sin.ll: FileCheck-ize.NAKAMURA Takumi2010-12-291-2/+2
| | | | llvm-svn: 122619
* test/CodeGen/X86/fp-in-intregs.ll: FileCheck-ize.NAKAMURA Takumi2010-12-291-1/+2
| | | | llvm-svn: 122618
* Fix bug when trying to output uint16_t or uint32_t.Rafael Espindola2010-12-291-0/+45
| | | | llvm-svn: 122615
* Implement cfi_def_cfa. Also don't convert to dwarf reg numbers twice. LooksRafael Espindola2010-12-291-0/+42
| | | | | | like 6 is a fixed point of that and so the previous tests were OK :-) llvm-svn: 122614
* Implement cfi_def_cfa_register.Rafael Espindola2010-12-291-0/+41
| | | | llvm-svn: 122612
* Initial .cfi_offset implementation.Rafael Espindola2010-12-291-0/+42
| | | | llvm-svn: 122611
* Don't produce a "DW_CFA_advance_loc 0".Rafael Espindola2010-12-281-0/+48
| | | | llvm-svn: 122609
* Implement .cfi_remember_state and .cfi_restore_state.Rafael Espindola2010-12-281-0/+45
| | | | llvm-svn: 122602
* Relax address updates in the eh_frame section.Rafael Espindola2010-12-281-6/+3
| | | | llvm-svn: 122591
* Start adding basic support for emitting the call frame instructions.Rafael Espindola2010-12-281-0/+49
| | | | llvm-svn: 122590
* Add support for .cfi_lsda.Rafael Espindola2010-12-271-125/+159
| | | | llvm-svn: 122584
* MC/Mach-O/Thumb: Select appropriate relocation types for Thumb.Daniel Dunbar2010-12-271-1/+1
| | | | llvm-svn: 122583
* Handle reloc_riprel_4byte_movq_load. Should make the bots happy.Rafael Espindola2010-12-271-0/+7
| | | | llvm-svn: 122579
* Add support for the same encodings of the personality function that gnu asRafael Espindola2010-12-271-11/+424
| | | | | | supports. llvm-svn: 122577
* implement enough of the memset inference algorithm to recognize and insert Chris Lattner2010-12-262-0/+47
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | memsets. This is still missing one important validity check, but this is enough to compile stuff like this: void test0(std::vector<char> &X) { for (std::vector<char>::iterator I = X.begin(), E = X.end(); I != E; ++I) *I = 0; } void test1(std::vector<int> &X) { for (long i = 0, e = X.size(); i != e; ++i) X[i] = 0x01010101; } With: $ clang t.cpp -S -o - -O2 -emit-llvm | opt -loop-idiom | opt -O3 | llc to: __Z5test0RSt6vectorIcSaIcEE: ## @_Z5test0RSt6vectorIcSaIcEE ## BB#0: ## %entry subq $8, %rsp movq (%rdi), %rax movq 8(%rdi), %rsi cmpq %rsi, %rax je LBB0_2 ## BB#1: ## %bb.nph subq %rax, %rsi movq %rax, %rdi callq ___bzero LBB0_2: ## %for.end addq $8, %rsp ret ... __Z5test1RSt6vectorIiSaIiEE: ## @_Z5test1RSt6vectorIiSaIiEE ## BB#0: ## %entry subq $8, %rsp movq (%rdi), %rax movq 8(%rdi), %rdx subq %rax, %rdx cmpq $4, %rdx jb LBB1_2 ## BB#1: ## %for.body.preheader andq $-4, %rdx movl $1, %esi movq %rax, %rdi callq _memset LBB1_2: ## %for.end addq $8, %rsp ret llvm-svn: 122573
* start using irbuilder to make mem intrinsics in a few passes.Chris Lattner2010-12-261-1/+1
| | | | llvm-svn: 122572
* Add support for @note. Patch by Jörg Sonnenberger.Rafael Espindola2010-12-261-1/+14
| | | | llvm-svn: 122568
* Add basic support for .cfi_personality.Rafael Espindola2010-12-261-7/+37
| | | | llvm-svn: 122566
* Generalize a previous change, fixing PR8855 - an valid large immediateChris Lattner2010-12-251-0/+4
| | | | | | rejected by the mc assembler. llvm-svn: 122557
* MemCpyOpt: Turn memcpys from a constant into a memset if possible.Benjamin Kramer2010-12-241-0/+19
| | | | | | | | | | | | | This allows us to compile "int cst[] = {-1, -1, -1};" into movl $-1, 16(%rsp) movq $-1, 8(%rsp) instead of movl _cst+8(%rip), %eax movl %eax, 16(%rsp) movq _cst(%rip), %rax movq %rax, 8(%rsp) llvm-svn: 122548
* MC/Mach-O/ARM: Start handling some Thumb branches.Daniel Dunbar2010-12-241-0/+139
| | | | llvm-svn: 122547
* In llvm-mc parse a Hash token as a full line comment. Allows handling ofKevin Enderby2010-12-241-0/+8
| | | | | | | preprocessed .s files and matches darwin gas. rdar://8798690 Also fix a comment on the next line of AsmParser.cpp after this new code. llvm-svn: 122531
* When determining if we can fold (x >> C1) << C2, the bits that we need to ↵Owen Anderson2010-12-231-0/+19
| | | | | | | | verify are zero are not the low bits of x, but the bits that WILL be the low bits after the operation completes. llvm-svn: 122529
* Radar 8803471: Fix expansion of ARM BCCi64 pseudo instructions.Bob Wilson2010-12-231-0/+1
| | | | | | | | If the basic block containing the BCCi64 (or BCCZi64) instruction ends with an unconditional branch, that branch needs to be deleted before appending the expansion of the BCCi64 to the end of the block. llvm-svn: 122521
* XFAIL vg_leak the new test as the rest.Torok Edwin2010-12-231-0/+1
| | | | llvm-svn: 122517
* Fix OCaml bindings crash, PR8847.Torok Edwin2010-12-231-0/+16
| | | | | | | | | | | | | | | | | See http://caml.inria.fr/mantis/view.php?id=4166 If we call only external functions from a module, then its 'let _' bindings don't get executed, which means that the exceptions don't get registered for use in the C code. This in turn causes llvm_raise to call raise_with_arg() with a NULL pointer and cause a segmentation fault. The workaround is to declare all 'external' functions as 'val' in these .mli files. Also added a separate testcase (the testcase must call only external functions for the bug to occur). llvm-svn: 122497
* Fixes PR8823: add-with-overflow-128.llAndrew Trick2010-12-231-3/+1
| | | | | | | | In the bottom-up selection DAG scheduling, handle two-address instructions that read/write unspillable registers. Treat the entire chain of two-address nodes as a single live range. llvm-svn: 122472
* DAGCombine add (sext i1), X into sub X, (zext i1) if sext from i1 is ↵Benjamin Kramer2010-12-221-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | illegal. The latter usually compiles into smaller code. example code: unsigned foo(unsigned x, unsigned y) { if (x != 0) y--; return y; } before: _foo: ## @foo cmpl $1, 4(%esp) ## encoding: [0x83,0x7c,0x24,0x04,0x01] sbbl %eax, %eax ## encoding: [0x19,0xc0] notl %eax ## encoding: [0xf7,0xd0] addl 8(%esp), %eax ## encoding: [0x03,0x44,0x24,0x08] ret ## encoding: [0xc3] after: _foo: ## @foo cmpl $1, 4(%esp) ## encoding: [0x83,0x7c,0x24,0x04,0x01] movl 8(%esp), %eax ## encoding: [0x8b,0x44,0x24,0x08] adcl $-1, %eax ## encoding: [0x83,0xd0,0xff] ret ## encoding: [0xc3] llvm-svn: 122455
* InstCombine: creating selects from -1 and 0 is fine, they combine into a ↵Benjamin Kramer2010-12-221-0/+12
| | | | | | sext from i1. llvm-svn: 122453
* X86: Lower a select directly to a setcc_carry if possible.Benjamin Kramer2010-12-221-2/+19
| | | | | | | | | | | | | | | | | | int test(unsigned long a, unsigned long b) { return -(a < b); } compiles to _test: ## @test cmpq %rsi, %rdi ## encoding: [0x48,0x39,0xf7] sbbl %eax, %eax ## encoding: [0x19,0xc0] ret ## encoding: [0xc3] instead of _test: ## @test xorl %ecx, %ecx ## encoding: [0x31,0xc9] cmpq %rsi, %rdi ## encoding: [0x48,0x39,0xf7] movl $-1, %eax ## encoding: [0xb8,0xff,0xff,0xff,0xff] cmovael %ecx, %eax ## encoding: [0x0f,0x43,0xc1] ret ## encoding: [0xc3] llvm-svn: 122451
* MC/Mach-O/ARM: Don't try to use scattered relocs for BR24 fixups.Daniel Dunbar2010-12-221-24/+38
| | | | llvm-svn: 122441
* Add reduced test from 8845.Rafael Espindola2010-12-221-0/+25
| | | | llvm-svn: 122438
* When determining whether the new instruction was already present inDuncan Sands2010-12-221-0/+11
| | | | | | | | the original instruction, half the cases were missed (making it not wrong but suboptimal). Also correct a typo (A <-> B) in the second chunk. llvm-svn: 122414
* Make this test not depend on how the variable is named.Duncan Sands2010-12-221-2/+2
| | | | llvm-svn: 122413
* MC/Mach-O/ARM: We always use the SECTDIFF reloc type on ARM, which isDaniel Dunbar2010-12-221-17/+72
| | | | | | esp. important given that the LOCAL_SECTDIFF enumeration got redefined. llvm-svn: 122412
* MC/Mach-O/ARM: Add enough relocation logic to get BR24 relocations.Daniel Dunbar2010-12-221-0/+102
| | | | llvm-svn: 122407
* Simplify the handling of .size expressions.Rafael Espindola2010-12-221-10/+0
| | | | llvm-svn: 122404
* Add a generic expansion transform: A op (B op' C) -> (A op B) op' (A op C)Duncan Sands2010-12-221-2/+14
| | | | | | | | if both A op B and A op C simplify. This fires fairly often but doesn't make that much difference. On gcc-as-one-file it removes two "and"s and turns one branch into a select. llvm-svn: 122399
* ptx: add ld instruction and testChe-Liang Chiou2010-12-221-0/+44
| | | | llvm-svn: 122398
* Fix a bug in ReduceLoadWidth that wasn't handling extendingChris Lattner2010-12-221-3/+21
| | | | | | | | | | | | | | | | | | | | | loads properly. We miscompiled the testcase into: _test: ## @test movl $128, (%rdi) movzbl 1(%rdi), %eax ret Now we get a proper: _test: ## @test movl $128, (%rdi) movsbl (%rdi), %eax movzbl %ah, %eax ret This fixes PR8757. llvm-svn: 122392
* Give GVN back the ability to perform simple conditional propagation on ↵Owen Anderson2010-12-211-0/+55
| | | | | | | | | conditional branch values. I still think that LVI should be handling this, but that capability is some ways off in the future, and this matters for some significant benchmarks. llvm-svn: 122378
* Reapply 122353-122355 with fixes. 122354 was wrong;Dale Johannesen2010-12-212-3/+13
| | | | | | | | the shift type was needed one place, the shift count type another. The transform in 123555 had the same problem. llvm-svn: 122366
* Add some x86 specific dagcombines for conditional increments.Benjamin Kramer2010-12-211-0/+89
| | | | | | | | | | | | | | | | | | | | | | | | | | | | (add Y, (sete X, 0)) -> cmp X, 1; adc 0, Y (add Y, (setne X, 0)) -> cmp X, 1; sbb -1, Y (sub (sete X, 0), Y) -> cmp X, 1; sbb 0, Y (sub (setne X, 0), Y) -> cmp X, 1; adc -1, Y for unsigned foo(unsigned a, unsigned b) { if (a == 0) b++; return b; } we now get: foo: cmpl $1, %edi movl %esi, %eax adcl $0, %eax ret instead of: foo: testl %edi, %edi sete %al movzbl %al, %eax addl %esi, %eax ret llvm-svn: 122364
* Revert 122353-122355 for the moment, they broke stuff.Dale Johannesen2010-12-212-13/+3
| | | | llvm-svn: 122360
* Add a new transform to DAGCombiner.Dale Johannesen2010-12-211-0/+10
| | | | llvm-svn: 122355
* Get the type of a shift from the shift, not from its shiftDale Johannesen2010-12-211-3/+3
| | | | | | | | count operand. These should be the same but apparently are not always, and this is cleaner anyway. This improves the code in an existing test. llvm-svn: 122354
* Revert 122341. It breaks some darwin tests.David Greene2010-12-211-39/+0
| | | | llvm-svn: 122346
* Fix PR 8199. This patch prepends the build tool dir to LLVM programsDavid Greene2010-12-211-0/+39
| | | | | | | | being tested. This ensures that we test the tools just built and not some random tools that might happen to be in the user's PATH. This makes LLVM testing much more stable and predictable. llvm-svn: 122341
* Add an additional InstructionSimplify factorization test.Duncan Sands2010-12-211-0/+10
| | | | llvm-svn: 122333
* While I don't think any later transforms can fire, it seems cleaner toDuncan Sands2010-12-211-0/+22
| | | | | | | not assume this (for example in case more transforms get added below it). Suggested by Frits van Bommel. llvm-svn: 122332
OpenPOWER on IntegriCloud