- Dec 09, 2010
-
-
Dan Gohman authored
before eliminating the operation that zeros them. This fixes rdar://8739316. llvm-svn: 121353
-
- Dec 07, 2010
-
-
Jay Foad authored
zextOrTrunc(), and APSInt methods extend(), extOrTrunc() and new method trunc(), to be const and to return a new value instead of modifying the object in place. llvm-svn: 121120
-
- Dec 01, 2010
-
-
Jay Foad authored
setAllBits(), setBit(unsigned), etc. llvm-svn: 120564
-
- Nov 29, 2010
-
-
Frits van Bommel authored
Transform (extractvalue (load P), ...) to (load (gep P, 0, ...)) if the load has no other uses, shrinking the load. llvm-svn: 120323
-
- Nov 23, 2010
-
-
Duncan Sands authored
llvm-svn: 120051
-
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
-
Duncan Sands authored
Stylistic improvement suggested by Frits van Bommel. llvm-svn: 120026
-
Duncan Sands authored
llvm-svn: 120025
-
Duncan Sands authored
fairly systematic way in instcombine. Some of these cases were already dealt with, in which case I removed the existing code. The case of Add has a bunch of funky logic which covers some of this plus a few variants (considers shifts to be a form of multiplication), which I didn't touch. The simplification performed is: A*B+A*C -> A*(B+C). The improvement is to do this in cases that were not already handled [such as A*B-A*C -> A*(B-C), which was reported on the mailing list], and also to do it more often by not checking for "only one use" if "B+C" simplifies. llvm-svn: 120024
-
Chris Lattner authored
on this instcombine xform. This fixes a miscompilation of 403.gcc. llvm-svn: 119988
-
- Nov 22, 2010
-
-
Benjamin Kramer authored
llvm-svn: 119984
-
Duncan Sands authored
then replace the index with zero. llvm-svn: 119974
-
Duncan Sands authored
InstructionSimplify. llvm-svn: 119970
-
- Nov 21, 2010
-
-
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
-
- Nov 17, 2010
-
-
Benjamin Kramer authored
llvm-svn: 119538
-
Duncan Sands authored
instructions out of InstCombine and into InstructionSimplify. While there, introduce an m_AllOnes pattern to simplify matching with integers and vectors with all bits equal to one. llvm-svn: 119536
-
- Nov 14, 2010
-
-
Duncan Sands authored
offload the work to hasConstantValue rather than do something more complicated (such handling mutually recursive phis) because (1) it is not clear it is worth it; and (2) if it is worth it, maybe such logic would be better placed in hasConstantValue. Adjust some GVN tests which are now cleaned up much further (eg: all phi nodes are removed). llvm-svn: 119043
-
- Nov 13, 2010
-
-
Duncan Sands authored
SimplifyAssociativeOrCommutative) "(A op C1) op C2" -> "A op (C1 op C2)", which previously was only done if C1 and C2 were constants, to occur whenever "C1 op C2" simplifies (a la InstructionSimplify). Since the simplifying operand combination can no longer be assumed to be the right-hand terms, consider all of the possible permutations. When compiling "gcc as one big file", transform 2 (i.e. using right-hand operands) fires about 4000 times but it has to be said that most of the time the simplifying operands are both constants. Transforms 3, 4 and 5 each fired once. Transform 6, which is an existing transform that I didn't change, never fired. With this change, the testcase is now optimized perfectly with one run of instcombine (previously it required instcombine + reassociate + instcombine, and it may just have been luck that this worked). llvm-svn: 119002
-
- Nov 10, 2010
-
-
Dale Johannesen authored
order to reduce ((x<<30)>>24) to x<<6, check the correct bits. PR 8547. llvm-svn: 118665
-
- Nov 01, 2010
-
-
Owen Anderson authored
bits are zero, not that the current low bits are zero. Fixes <rdar://problem/8606771>. llvm-svn: 117953
-
- Oct 30, 2010
-
-
Bob Wilson authored
llvm-svn: 117728
-
Bob Wilson authored
llvm-svn: 117727
-
Bob Wilson authored
llvm-svn: 117722
-
Bob Wilson authored
This code had previously used 2*N, where N is the mask length, to represent undef. That is not safe because the shufflevector operands may have more than N elements -- they don't have to match the result type. llvm-svn: 117721
-
Bob Wilson authored
Allow splats even if they don't match either of the original shuffles, possibly due to undef entries in the shuffles masks. Radar 8597790. Also fix some 80-column violations. llvm-svn: 117719
-
- Oct 28, 2010
-
-
Dale Johannesen authored
llvm-svn: 117510
-
- Oct 25, 2010
-
-
Dan Gohman authored
from stores when folding in bitcasts. llvm-svn: 117265
-
- Oct 23, 2010
-
-
Benjamin Kramer authored
llvm-svn: 117213
-
- Oct 22, 2010
-
-
Bob Wilson authored
llvm-svn: 117154
-
- Oct 19, 2010
-
-
Owen Anderson authored
Get rid of static constructors for pass registration. Instead, every pass exposes an initializeMyPassFunction(), which must be called in the pass's constructor. This function uses static dependency declarations to recursively initialize the pass's dependencies. Clients that only create passes through the createFooPass() APIs will require no changes. Clients that want to use the CommandLine options for passes will need to manually call the appropriate initialization functions in PassInitialization.h before parsing commandline arguments. I have tested this with all standard configurations of clang and llvm-gcc on Darwin. It is possible that there are problems with the static dependencies that will only be visible with non-standard options. If you encounter any crash in pass registration/creation, please send the testcase to me directly. llvm-svn: 116820
-
- Oct 08, 2010
-
-
Owen Anderson authored
llvm-svn: 115996
-
- Oct 07, 2010
-
-
Owen Anderson authored
llvm-svn: 115965
-
- Oct 01, 2010
-
-
Chris Lattner authored
llvm-svn: 115296
-
- Sep 29, 2010
-
-
Oscar Fuentes authored
llvm-svn: 114999
-
- Sep 14, 2010
-
-
Michael J. Spencer authored
This reverts commit r113632 Conflicts: cmake/modules/AddLLVM.cmake llvm-svn: 113819
-
- Sep 13, 2010
-
-
Owen Anderson authored
to expose greater opportunities for store narrowing in codegen. This patch fixes a potential infinite loop in instcombine caused by one of the introduced transforms being overly aggressive. llvm-svn: 113763
-
- Sep 12, 2010
-
-
Eric Christopher authored
on to Owen. llvm-svn: 113720
-
- Sep 11, 2010
-
-
Owen Anderson authored
This can result in increased opportunities for store narrowing in code generation. Update a number of tests for this change. This fixes <rdar://problem/8285027>. Additionally, because this inverts the order of ors and ands, some patterns for optimizing or-of-and-of-or no longer fire in instances where they did originally. Add a simple transform which recaptures most of these opportunities: if we have an or-of-constant-or and have failed to fold away the inner or, commute the order of the two ors, to give the non-constant or a chance for simplification instead. llvm-svn: 113679
-
- Sep 10, 2010
-
-
Michael J. Spencer authored
llvm-svn: 113632
-