- Dec 29, 2010
-
-
NAKAMURA Takumi authored
llvm-svn: 122620
-
NAKAMURA Takumi authored
llvm-svn: 122619
-
NAKAMURA Takumi authored
llvm-svn: 122618
-
Rafael Espindola authored
llvm-svn: 122615
-
Rafael Espindola authored
like 6 is a fixed point of that and so the previous tests were OK :-) llvm-svn: 122614
-
Rafael Espindola authored
llvm-svn: 122612
-
Rafael Espindola authored
llvm-svn: 122611
-
Rafael Espindola authored
llvm-svn: 122609
-
- Dec 28, 2010
-
-
Rafael Espindola authored
llvm-svn: 122602
-
Rafael Espindola authored
llvm-svn: 122591
-
Rafael Espindola authored
llvm-svn: 122590
-
- Dec 27, 2010
-
-
Rafael Espindola authored
llvm-svn: 122584
-
Daniel Dunbar authored
llvm-svn: 122583
-
Rafael Espindola authored
llvm-svn: 122579
-
Rafael Espindola authored
supports. llvm-svn: 122577
-
Chris Lattner authored
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
-
- Dec 26, 2010
-
-
Chris Lattner authored
llvm-svn: 122572
-
Rafael Espindola authored
llvm-svn: 122568
-
Rafael Espindola authored
llvm-svn: 122566
-
- Dec 25, 2010
-
-
Chris Lattner authored
rejected by the mc assembler. llvm-svn: 122557
-
- Dec 24, 2010
-
-
Benjamin Kramer authored
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
-
Daniel Dunbar authored
llvm-svn: 122547
-
Kevin Enderby authored
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
-
Owen Anderson authored
are not the low bits of x, but the bits that WILL be the low bits after the operation completes. llvm-svn: 122529
-
- Dec 23, 2010
-
-
Bob Wilson authored
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
-
Torok Edwin authored
llvm-svn: 122517
-
Torok Edwin authored
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
-
Andrew Trick authored
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
-
Benjamin Kramer authored
DAGCombine add (sext i1), X into sub X, (zext i1) if sext from i1 is 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
-
Benjamin Kramer authored
llvm-svn: 122453
-
Benjamin Kramer authored
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
-
- Dec 22, 2010
-
-
Daniel Dunbar authored
llvm-svn: 122441
-
Rafael Espindola authored
llvm-svn: 122438
-
Duncan Sands authored
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
-
Duncan Sands authored
llvm-svn: 122413
-
Daniel Dunbar authored
esp. important given that the LOCAL_SECTDIFF enumeration got redefined. llvm-svn: 122412
-
Daniel Dunbar authored
llvm-svn: 122407
-
Rafael Espindola authored
llvm-svn: 122404
-
Duncan Sands authored
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
-
Che-Liang Chiou authored
llvm-svn: 122398
-