- Mar 25, 2007
-
-
Reid Spencer authored
Remove a use of getLowBitsSet that caused the mask used for replacement of shl/lshr pairs with an AND instruction to be computed incorrectly. Its not clear exactly why this is the case. This solves the disappearing shifts problem, but it doesn't fix Regression/C/2003-05-21-UnionBitFields. It seems there is more going on. llvm-svn: 35342
-
Chris Lattner authored
llvm-svn: 35341
-
Reid Spencer authored
* Don't assume shift amounts are <= 64 bits * Avoid creating an extra APInt in SubOne and AddOne by using -- and ++ * Add another use of getLowBitsSet * Convert a series of if statements to a switch llvm-svn: 35339
-
Reid Spencer authored
using the facilities of APInt. While this duplicates a tiny fraction of the constant folding code, it also makes the code easier to read and avoids large ConstantExpr overhead for simple, known computations. llvm-svn: 35335
-
Zhou Sheng authored
2. Use isStrictlyPositive() instead of isPositive() in two places where they need APInt value > 0 not only >=0. llvm-svn: 35333
-
Reid Spencer authored
APInt with its type mask. llvm-svn: 35325
-
Reid Spencer authored
* Convert the last use of a uint64_t that should have been an APInt. * Change ComputeMaskedBits to have a const reference argument for the Mask so that recursions don't cause unneeded temporaries. This causes temps to be needed in other places (where the mask has to change) but this change optimizes for the recursion which is more frequent. * Remove two instances of &ing a Mask with getAllOnesValue. Its not needed any more because APInt is accurate in its bit computations. * Start using the getLowBitsSet and getHighBits set methods on APInt instead of shifting. This makes it more clear in the code what is going on. llvm-svn: 35321
-
Chris Lattner authored
llvm-svn: 35314
-
- Mar 24, 2007
-
-
Zhou Sheng authored
llvm-svn: 35297
-
Reid Spencer authored
Convert some calls to ConstantInt::getZExtValue() into getValue() and use APInt facilities in the subsequent computations. llvm-svn: 35294
-
- Mar 23, 2007
-
-
Reid Spencer authored
* APIntify visitAdd and visitSelectInst * Remove unused uint64_t versions of utility functions that have been replaced with APInt versions. This completes most of the changes for APIntification of InstCombine. This passes llvm-test and llvm/test/Transforms/InstCombine/APInt. Patch by Zhou Sheng. llvm-svn: 35287
-
Reid Spencer authored
APIntify visitDiv, visitMul and visitRem. Patch by Zhou Sheng. llvm-svn: 35283
-
Chris Lattner authored
llvm-svn: 35282
-
Reid Spencer authored
APIntify several utility functions supporting logical operators and shift operators. Patch by Zhou Sheng. llvm-svn: 35281
-
Zhou Sheng authored
llvm-svn: 35276
-
Zhou Sheng authored
llvm-svn: 35275
-
- Mar 22, 2007
-
-
Reid Spencer authored
APInt support for logical operators in visitAnd, visitOr, and visitXor. Patch by Zhou Sheng. llvm-svn: 35273
-
Reid Spencer authored
* APIntify commonIntCastTransforms * APIntify visitTrunc * APIntify visitZExt Patch by Zhou Sheng. llvm-svn: 35271
-
Reid Spencer authored
* Re-enable the APInt version of MaskedValueIsZero. * APIntify the Comput{Un}SignedMinMaxValuesFromKnownBits functions * APIntify visitICmpInst. llvm-svn: 35270
-
Dan Gohman authored
llvm-svn: 35265
-
Nick Lewycky authored
Analyze GEPs. If the indices are all zero, transfer whether the pointer is known to be not null through the GEP. Add a few more cases for xor and shift instructions. llvm-svn: 35257
-
Reid Spencer authored
* Fix some indentation and comments in InsertRangeTest * Add an "IsSigned" parameter to AddWithOverflow and make it handle signed additions. Also, APIntify this function so it works with any bitwidth. * For the icmp pred ([us]div %X, C1), C2 transforms, exit early if the div instruction's RHS is zero. * Finally, for icmp pred (sdiv %X, C1), -C2, fix an off-by-one error. The HiBound needs to be incremented in order to get the range test correct. llvm-svn: 35247
-
- Mar 20, 2007
-
-
Dale Johannesen authored
instructions (that would have to be split later) llvm-svn: 35227
-
Jeff Cohen authored
llvm-svn: 35224
-
Devang Patel authored
Use ETForest instead of DominatorSet. llvm-svn: 35221
-
Zhou Sheng authored
llvm-svn: 35211
-
Dale Johannesen authored
llvm-svn: 35197
-
Reid Spencer authored
llvm-svn: 35194
-
- Mar 19, 2007
-
-
Reid Spencer authored
llvm-svn: 35190
-
Reid Spencer authored
Patch by Sheng Zhou. llvm-svn: 35188
-
Reid Spencer authored
Patch by Zhou Sheng. llvm-svn: 35187
-
Reid Spencer authored
llvm-svn: 35186
-
Reid Spencer authored
2. Replace uses of the "isPositive" utility function with APInt::isPositive llvm-svn: 35185
-
Reid Spencer authored
Patch by Sheng Zhou. llvm-svn: 35184
-
Chris Lattner authored
llvm-svn: 35169
-
Chris Lattner authored
implements Transforms/ScalarRepl/memset-aggregate-byte-leader.ll llvm-svn: 35150
-
- Mar 18, 2007
-
-
Nick Lewycky authored
llvm-svn: 35146
-
Chris Lattner authored
Rearrange some code to simplify it now that shifts are binops llvm-svn: 35145
-
Nick Lewycky authored
Add some more micro-optimizations: x * 0 = 0, a - x = a --> x = 0. llvm-svn: 35138
-
- Mar 17, 2007
-
-
Anton Korobeynikov authored
llvm-svn: 35137
-