- Jan 17, 2010
-
-
Owen Anderson authored
llvm-svn: 93679
-
- Jan 15, 2010
-
-
Bob Wilson authored
llvm-svn: 93560
-
- Jan 14, 2010
-
-
Bill Wendling authored
added to the FSub version. However, the original version of this xform guarded against doing this for floating point (!Op0->getType()->isFPOrFPVector()). This is causing LLVM to perform incorrect xforms for code like: void func(double *rhi, double *rlo, double xh, double xl, double yh, double yl){ double mh, ml; double c = 134217729.0; double up, u1, u2, vp, v1, v2; up = xh*c; u1 = (xh - up) + up; u2 = xh - u1; vp = yh*c; v1 = (yh - vp) + vp; v2 = yh - v1; mh = xh*yh; ml = (((u1*v1 - mh) + (u1*v2)) + (u2*v1)) + (u2*v2); ml += xh*yl + xl*yh; *rhi = mh + ml; *rlo = (mh - (*rhi)) + ml; } The last line was optimized away, but rl is intended to be the difference between the infinitely precise result of mh + ml and after it has been rounded to double precision. llvm-svn: 93369
-
- Jan 12, 2010
-
-
Chris Lattner authored
in JT. 2) When cloning blocks for PHI or xor conditions, use instsimplify to simplify the code as we go. This allows us to squish common cases early in JT which opens up opportunities for subsequent iterations, and allows it to completely simplify the testcase. llvm-svn: 93253
-
Chris Lattner authored
llvm-svn: 93251
-
Chris Lattner authored
llvm-svn: 93222
-
Chris Lattner authored
condition is a xor with a phi node. This eliminates nonsense like this from 176.gcc in several places: LBB166_84: testl %eax, %eax - setne %al - xorb %cl, %al - notb %al - testb $1, %al - je LBB166_85 + je LBB166_69 + jmp LBB166_85 This is rdar://7391699 llvm-svn: 93221
-
Chris Lattner authored
on branches by renaming it and checking for a branch at the call site. llvm-svn: 93208
-
- Jan 11, 2010
-
-
Chris Lattner authored
codegen has no apparent problem with the trunc version of this, because it turns into a simple subreg idiom llvm-svn: 93202
-
Chris Lattner authored
trunc has multiple uses. Codegen is not able to coalesce the subreg case correctly and so this leads to higher register pressure and spilling (see PR5997). This speeds up 256.bzip2 from 8.60 -> 8.04s on my machine, ~7%. llvm-svn: 93200
-
Chris Lattner authored
good code on PR4216: _test_bitfield: ## @test_bitfield orl $32962, %edi movl $4294941946, %eax andq %rdi, %rax ret instead of: _test_bitfield: movl $4294941696, %ecx movl %edi, %eax orl $194, %edi orl $32768, %eax andq $250, %rdi andq %rax, %rcx movq %rdi, %rax orq %rcx, %rax ret Evan is looking into the remaining andq+imm -> andl optimization. llvm-svn: 93147
-
Chris Lattner authored
BitsToClear case. This allows it to promote expressions which have an and/or/xor after the lshr, promoting cases like test2 (from PR4216) and test3 (random extample extracted from a spec benchmark). clang now compiles the code in PR4216 into: _test_bitfield: ## @test_bitfield movl %edi, %eax orl $194, %eax movl $4294902010, %ecx andq %rax, %rcx orl $32768, %edi andq $39936, %rdi movq %rdi, %rax orq %rcx, %rax ret instead of: _test_bitfield: ## @test_bitfield movl %edi, %eax orl $194, %eax movl $4294902010, %ecx andq %rax, %rcx shrl $8, %edi orl $128, %edi shlq $8, %rdi andq $39936, %rdi movq %rdi, %rax orq %rcx, %rax ret which is still not great, but is progress. llvm-svn: 93145
-
Chris Lattner authored
new BitsToClear result which allows us to start promoting expressions that end with a lshr-by-constant. This is conservatively correct and better than what we had before (see testcases) but still needs to be extended further. llvm-svn: 93144
-
Chris Lattner authored
llvm-svn: 93143
-
- Jan 10, 2010
-
-
Chris Lattner authored
the dest of the sext. llvm-svn: 93128
-
Chris Lattner authored
the zext dest type. This allows us to handle test52/53 in cast.ll, and allows llvm-gcc to generate much better code for PR4216 in -m64 mode: _test_bitfield: ## @test_bitfield orl $32962, %edi movl %edi, %eax andl $-25350, %eax ret This also fixes a bug handling vector extends, ensuring that the mask produced is a vector constant, not an integer constant. llvm-svn: 93127
-
Chris Lattner authored
simpler profitability predicate. llvm-svn: 93111
-
Chris Lattner authored
llvm-svn: 93110
-
Chris Lattner authored
elimination of a sign extend to be a win, which simplifies the client of CanEvaluateSExtd, and allows us to eliminate more casts (examples taken from real code). llvm-svn: 93109
-
Chris Lattner authored
lshr+ashr instead of trunc+sext. We want to avoid type conversions whenever possible, it is easier to codegen expressions without truncates and extensions. llvm-svn: 93107
-
Chris Lattner authored
llvm-svn: 93106
-
Chris Lattner authored
llvm-svn: 93105
-
Chris Lattner authored
bits known clear in the result and don't care about the # casts eliminated. TD is also dead but keeping it for now. llvm-svn: 93098
-
Chris Lattner authored
1) don't try to optimize a sext or zext that is only used by a trunc, let the trunc get optimized first. This avoids some pointless effort in some common cases since instcombine scans down a block in the first pass. 2) Change the cost model for zext elimination to consider an 'and' cheaper than a zext. This allows us to do it more aggressively, and for the next patch to simplify the code quite a bit. llvm-svn: 93097
-
Chris Lattner authored
more expressions to be promoted and casts eliminated. llvm-svn: 93096
-
Chris Lattner authored
llvm-svn: 93095
-
Julien Lerouge authored
llvm-svn: 93093
-
Chris Lattner authored
llvm-svn: 93092
-
Chris Lattner authored
llvm-svn: 93091
-
Chris Lattner authored
commonIntCastTransforms into the callers, eliminating a switch, and allowing the static predicate methods to be moved down to live next to the corresponding function. No functionality change. llvm-svn: 93089
-
- Jan 09, 2010
-
-
Chris Lattner authored
base is the right expression type. This fixes PR5981. llvm-svn: 93045
-
Julien Lerouge authored
llvm-svn: 93038
-
- Jan 08, 2010
-
-
Eric Christopher authored
llvm-svn: 93026
-
Chris Lattner authored
llvm-svn: 93024
-
Chris Lattner authored
simplify it now that it is only used for truncates. llvm-svn: 93021
-
Chris Lattner authored
the input is already sign extended. llvm-svn: 93019
-
Duncan Sands authored
remove some trailing whitespace while there. llvm-svn: 93008
-
Chris Lattner authored
llvm-svn: 93007
-
Chris Lattner authored
llvm-svn: 92964
-
Chris Lattner authored
that feeds into a zext, similar to the patch I did yesterday for sext. There is a lot of room for extension beyond this patch. llvm-svn: 92962
-