- Jan 01, 2011
-
-
Duncan Sands authored
is the wrong hammer for this nail, and is probably right. llvm-svn: 122661
-
Duncan Sands authored
numbering, in which it considers (for example) "%a = add i32 %x, %y" and "%b = add i32 %x, %y" to be equal because the operands are equal and the result of the instructions only depends on the values of the operands. This has almost no effect (it removes 4 instructions from gcc-as-one-file), and perhaps slows down compilation: I measured a 0.4% slowdown on the large gcc-as-one-file testcase, but it wasn't statistically significant. llvm-svn: 122654
-
- Dec 28, 2010
-
-
Chris Lattner authored
llvm-svn: 122603
-
- Dec 23, 2010
-
-
Benjamin Kramer authored
Remove/fix invalid README entries. The well thought out strcpy function doesn't return a pointer to the end of the string. llvm-svn: 122496
-
- Dec 19, 2010
-
-
Chris Lattner authored
This resolves a README entry and technically resolves PR4916, but we still get poor code for the testcase in that PR because GVN isn't CSE'ing uadd with add, filed as PR8817. Previously we got: _test7: ## @test7 addq %rsi, %rdi cmpq %rdi, %rsi movl $42, %eax cmovaq %rsi, %rax ret Now we get: _test7: ## @test7 addq %rsi, %rdi movl $42, %eax cmovbq %rsi, %rax ret llvm-svn: 122182
-
- Dec 15, 2010
-
-
Chris Lattner authored
llvm-svn: 121854
-
Chris Lattner authored
llvm-svn: 121853
-
Chris Lattner authored
llvm-svn: 121850
-
Chris Lattner authored
llvm-svn: 121849
-
- Dec 13, 2010
-
-
Chris Lattner authored
llvm-svn: 121656
-
- Dec 11, 2010
-
-
Benjamin Kramer authored
(x & 2^n) ? 2^m+C : C we can offset both arms by C to get the "(x & 2^n) ? 2^m : 0" form, optimize the select to a shift and apply the offset afterwards. llvm-svn: 121609
-
- Nov 23, 2010
-
-
Benjamin Kramer authored
E.g. -5 % 5 is 0 with srem and 1 with urem. Also addresses Frits van Bommel's comments. llvm-svn: 120049
-
Benjamin Kramer authored
This allows to transform the rem in "1 << ((int)x % 8);" to an and. llvm-svn: 120028
-
- Nov 22, 2010
-
-
Benjamin Kramer authored
llvm-svn: 119984
-
Benjamin Kramer authored
This currently only catches the most basic case, a two-case switch, but can be extended later. llvm-svn: 119964
-
- Nov 21, 2010
-
-
Chris Lattner authored
llvm-svn: 119925
-
Chris Lattner authored
void a(int x) { if (((1<<x)&8)==0) b(); } into "x != 3", which occurs over 100 times in 403.gcc but in no other program in llvm-test. llvm-svn: 119922
-
Chris Lattner authored
llvm-svn: 119920
-
- Nov 11, 2010
-
-
Chris Lattner authored
llvm-svn: 118806
-
Chris Lattner authored
llvm-svn: 118797
-
- Nov 09, 2010
-
-
Chris Lattner authored
llvm-svn: 118608
-
- Nov 07, 2010
-
-
Duncan Sands authored
of a select instruction, see if doing the compare with the true and false values of the select gives the same result. If so, that can be used as the value of the comparison. llvm-svn: 118378
-
- Nov 06, 2010
-
-
Benjamin Kramer authored
llvm-svn: 118337
-
- Sep 30, 2010
-
-
Benjamin Kramer authored
llvm-svn: 115116
-
- Sep 19, 2010
-
-
Chris Lattner authored
llvm-svn: 114304
-
- Aug 08, 2010
-
-
Nick Lewycky authored
llvm-svn: 110543
-
- Jul 08, 2010
-
-
Benjamin Kramer authored
(X >s -1) ? C1 : C2 and (X <s 0) ? C2 : C1 into ((X >>s 31) & (C2 - C1)) + C1, avoiding the conditional. This optimization could be extended to take non-const C1 and C2 but we better stay conservative to avoid code size bloat for now. for int sel(int n) { return n >= 0 ? 60 : 100; } we now generate sarl $31, %edi andl $40, %edi leal 60(%rdi), %eax instead of testl %edi, %edi movl $60, %ecx movl $100, %eax cmovnsl %ecx, %eax llvm-svn: 107866
-
- Jul 03, 2010
-
-
Eli Friedman authored
llvm-svn: 107569
-
Eli Friedman authored
llvm-svn: 107565
-
- Jun 30, 2010
-
-
Eric Christopher authored
llvm-svn: 107213
-
- Jun 16, 2010
-
-
Benjamin Kramer authored
llvm-svn: 106102
-
- Jun 12, 2010
-
-
Eli Friedman authored
llvm-svn: 105878
-
- May 22, 2010
-
-
Chris Lattner authored
llvm-svn: 104404
-
- May 03, 2010
-
-
Dan Gohman authored
llvm-svn: 102906
-
- Apr 17, 2010
-
-
Chris Lattner authored
llvm-svn: 101581
-
- Apr 15, 2010
-
-
rdar://7860110Chris Lattner authored
a load/or/and/store sequence into a narrower store when it is safe. Daniel tells me that clang will start producing this sort of thing with bitfields, and this does trigger a few dozen times on 176.gcc produced by llvm-gcc even now. This compiles code like CodeGen/X86/2009-05-28-DAGCombineCrash.ll into: movl %eax, 36(%rdi) instead of: movl $4294967295, %eax ## imm = 0xFFFFFFFF andq 32(%rdi), %rax shlq $32, %rcx addq %rax, %rcx movq %rcx, 32(%rdi) and each of the testcases into a single store. Each of them used to compile into craziness like this: _test4: movl $65535, %eax ## imm = 0xFFFF andl (%rdi), %eax shll $16, %esi addl %eax, %esi movl %esi, (%rdi) ret llvm-svn: 101343
-
- Mar 10, 2010
-
-
Chris Lattner authored
llvm-svn: 98194
-
- Feb 09, 2010
-
-
Chris Lattner authored
llvm-svn: 95624
-
- Jan 31, 2010
-
-
Eli Friedman authored
llvm-svn: 94945
-
- Jan 29, 2010
-
-
Bob Wilson authored
indices are safe if the result is known to be within the bounds of the underlying object. llvm-svn: 94829
-