- Apr 02, 2007
-
-
Chris Lattner authored
target hook. This allows us to codegen a loop as: LBB1_1: @cond_next mov r2, #0 str r2, [r0, +r3, lsl #2] add r3, r3, #1 cmn r3, #1 bne LBB1_1 @cond_next instead of: LBB1_1: @cond_next mov r2, #0 str r2, [r0], #+4 add r3, r3, #1 cmn r3, #1 bne LBB1_1 @cond_next This looks the same, but has one fewer induction variable (and therefore, one fewer register) live in the loop. llvm-svn: 35592
-
Chris Lattner authored
llvm-svn: 35588
-
Chris Lattner authored
llvm-svn: 35587
-
Chris Lattner authored
test/Transforms/InstCombine/xor.ll:test28 llvm-svn: 35584
-
Chris Lattner authored
isel has its own particular features that it wants in the CFG, in order to reduce the number of times a constant is computed, etc. Make sure that we clean up the CFG before doing any other things for isel. Doing so can dramatically reduce the number of split edges and reduce the number of places that constants get computed. For example, this shrinks CodeGen/Generic/phi-immediate-factoring.ll from 44 to 37 instructions on X86, and from 21 to 17 MBB's in the output. This is primarily a code size win, not a performance win. This implements CodeGen/Generic/phi-immediate-factoring.ll and PR1296. llvm-svn: 35575
-
Chris Lattner authored
llvm-svn: 35563
-
- Apr 01, 2007
-
-
Chris Lattner authored
llvm-svn: 35561
-
Zhou Sheng authored
llvm-svn: 35555
-
Reid Spencer authored
Support overloaded intrinsics bswap, ctpop, cttz, ctlz. llvm-svn: 35547
-
Chris Lattner authored
llvm-svn: 35536
-
- Mar 31, 2007
-
-
Chris Lattner authored
llvm-svn: 35528
-
Zhou Sheng authored
llvm-svn: 35525
-
Zhou Sheng authored
llvm-svn: 35524
-
- Mar 30, 2007
-
-
Zhou Sheng authored
llvm-svn: 35510
-
Zhou Sheng authored
amount is safe. 2. Use new method on ConstantInt instead of (? :) operator. 3. Use new method uge() on ConstantInt to simplify codes. llvm-svn: 35505
-
Zhou Sheng authored
llvm-svn: 35503
-
- Mar 29, 2007
-
-
Zhou Sheng authored
2. Let APInt variable do the binary operation stuff instead of using ConstantExpr::getXXX. llvm-svn: 35450
-
Zhou Sheng authored
llvm-svn: 35446
-
Zhou Sheng authored
1. Line out nested call of APInt::zext/trunc. 2. Make more use of APInt::getHighBitsSet/getLowBitsSet. 3. Use APInt[] operator instead of expression like "APIntVal & SignBit". llvm-svn: 35444
-
Zhou Sheng authored
instead of using ConstantExpr::getXX. 2. Use constant reference to APInt if possible instead of expensive APInt copy. llvm-svn: 35443
-
- Mar 28, 2007
-
-
Zhou Sheng authored
llvm-svn: 35431
-
Zhou Sheng authored
2. Use APInt[] instead of "X & SignBit". 3. Clean up some codes. 4. Make the expression like "ShiftAmt = ShiftAmtC->getZExtValue()" safe. llvm-svn: 35424
-
Zhou Sheng authored
2. Make the APInt value do the zext/trunc stuff instead of using ConstantExpr::getZExt(). llvm-svn: 35422
-
Zhou Sheng authored
llvm-svn: 35418
-
Zhou Sheng authored
llvm-svn: 35414
-
Zhou Sheng authored
1. Line out nested use of zext/trunc. 2. Make more use of getHighBitsSet/getLowBitsSet. 3. Use APInt[] != 0 instead of "(APInt & SignBit) != 0". llvm-svn: 35408
-
Reid Spencer authored
When converting an add/xor/and triplet into a trunc/sext, only do so if the intermediate integer type is a bitwidth that the targets can handle. llvm-svn: 35400
-
- Mar 27, 2007
-
-
Evan Cheng authored
llvm-svn: 35383
-
Reid Spencer authored
llvm-svn: 35373
-
Reid Spencer authored
Fix another incorrectly converted shift mask. llvm-svn: 35371
-
- Mar 26, 2007
-
-
Chris Lattner authored
llvm-svn: 35361
-
Reid Spencer authored
original and new instruction. A slight performance hit with ostringstream but it is only for debug. Also, clean up an uninitialized variable warning noticed in a release build. llvm-svn: 35358
-
Reid Spencer authored
llvm-svn: 35357
-
Reid Spencer authored
Fix SingleSource/Regression/C/2003-05-21-UnionBitFields.c by changing a getHighBitsSet call to getLowBitsSet call that was incorrectly converted from the original lshr constant expression. llvm-svn: 35348
-
Dale Johannesen authored
llvm-svn: 35347
-
- 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
-