[llvm-commits] CVS: llvm/lib/VMCore/ConstantFold.cpp

2007-03-24 Thread Chris Lattner
Changes in directory llvm/lib/VMCore: ConstantFold.cpp updated: 1.148 -> 1.149 --- Log message: fold constantexprs more aggressively, fixing PR1265: http://llvm.org/PR1265 --- Diffs of the changes: (+17 -2) ConstantFold.cpp | 19 +-- 1 files changed, 17 insertions(+), 2

[llvm-commits] CVS: llvm/lib/Transforms/Scalar/InstructionCombining.cpp

2007-03-24 Thread Reid Spencer
Changes in directory llvm/lib/Transforms/Scalar: InstructionCombining.cpp updated: 1.687 -> 1.688 --- Log message: Refactor several ConstantExpr::getXXX calls with ConstantInt arguments using the facilities of APInt. While this duplicates a tiny fraction of the constant folding code, it also m

Re: [llvm-commits] CVS: llvm/lib/Transforms/Scalar/InstructionCombining.cpp

2007-03-24 Thread Chris Lattner
> @@ -2443,10 +2443,9 @@ >// Check to see if this is an unsigned division with an exact > power of 2, >// if so, convert to a right shift. >if (ConstantInt *C = dyn_cast(Op1)) { > -APInt Val(C->getValue()); > -if (Val != 0 && Val.isPowerOf2())// Don't break X / 0 > +if

Re: [llvm-commits] CVS: llvm/lib/Transforms/Scalar/InstructionCombining.cpp

2007-03-24 Thread Chris Lattner
On Mar 24, 2007, at 9:55 PM, Nick Lewycky wrote: > Chris Lattner wrote: >> On Mar 23, 2007, at 11:46 AM, Reid Spencer wrote: >> >>> // shl uint X, 32 = 0 and shr ubyte Y, 9 = 0, ... just don't >>> eliminate shr >>> // of a signed value. >>> // >>> - unsigned TypeBits = Op0->getType()->getP

Re: [llvm-commits] CVS: llvm/lib/Transforms/Scalar/InstructionCombining.cpp

2007-03-24 Thread Reid Spencer
On Sun, 2007-03-25 at 00:55 -0400, Nick Lewycky wrote: > Chris Lattner wrote: > > On Mar 23, 2007, at 11:46 AM, Reid Spencer wrote: > > > >> // shl uint X, 32 = 0 and shr ubyte Y, 9 = 0, ... just don't > >>eliminate shr > >> // of a signed value. > >> // > >>- unsigned TypeBits = Op0->get

[llvm-commits] CVS: llvm/lib/Target/PowerPC/README.txt

2007-03-24 Thread Chris Lattner
Changes in directory llvm/lib/Target/PowerPC: README.txt updated: 1.112 -> 1.113 --- Log message: add a note --- Diffs of the changes: (+1 -0) README.txt |1 + 1 files changed, 1 insertion(+) Index: llvm/lib/Target/PowerPC/README.txt diff -u llvm/lib/Target/PowerPC/README.txt:1.112

[llvm-commits] CVS: llvm/lib/Transforms/Scalar/InstructionCombining.cpp

2007-03-24 Thread Zhou Sheng
Changes in directory llvm/lib/Transforms/Scalar: InstructionCombining.cpp updated: 1.686 -> 1.687 --- Log message: 1. Avoid unnecessary APInt construction if possible. 2. Use isStrictlyPositive() instead of isPositive() in two places where they need APInt value > 0 not only >=0. --- Diffs

[llvm-commits] CVS: llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp

2007-03-24 Thread Chris Lattner
Changes in directory llvm/lib/CodeGen/SelectionDAG: SelectionDAGISel.cpp updated: 1.392 -> 1.393 --- Log message: Implement support for vector operands to inline asm, implementing CodeGen/X86/2007-03-24-InlineAsmVectorOp.ll --- Diffs of the changes: (+16 -4) SelectionDAGISel.cpp | 20 +++

[llvm-commits] CVS: llvm/test/CodeGen/X86/2007-03-24-InlineAsmVectorOp.ll

2007-03-24 Thread Chris Lattner
Changes in directory llvm/test/CodeGen/X86: 2007-03-24-InlineAsmVectorOp.ll added (r1.1) --- Log message: new testcase --- Diffs of the changes: (+11 -0) 2007-03-24-InlineAsmVectorOp.ll | 11 +++ 1 files changed, 11 insertions(+) Index: llvm/test/CodeGen/X86/2007-03-24-InlineAs

Re: [llvm-commits] CVS: llvm/lib/Transforms/Scalar/InstructionCombining.cpp

2007-03-24 Thread Nick Lewycky
Chris Lattner wrote: > On Mar 23, 2007, at 11:46 AM, Reid Spencer wrote: > >> // shl uint X, 32 = 0 and shr ubyte Y, 9 = 0, ... just don't >>eliminate shr >> // of a signed value. >> // >>- unsigned TypeBits = Op0->getType()->getPrimitiveSizeInBits(); >>- if (Op1->getZExtValue() >= TypeB

[llvm-commits] CVS: llvm/lib/Target/PowerPC/README.txt

2007-03-24 Thread Chris Lattner
Changes in directory llvm/lib/Target/PowerPC: README.txt updated: 1.111 -> 1.112 --- Log message: add a note --- Diffs of the changes: (+13 -0) README.txt | 13 + 1 files changed, 13 insertions(+) Index: llvm/lib/Target/PowerPC/README.txt diff -u llvm/lib/Target/PowerPC/REA

[llvm-commits] CVS: llvm/lib/Target/PowerPC/PPCInstr64Bit.td

2007-03-24 Thread Chris Lattner
Changes in directory llvm/lib/Target/PowerPC: PPCInstr64Bit.td updated: 1.41 -> 1.42 --- Log message: Fix CodeGen/PowerPC/2007-03-24-cntlzd.ll --- Diffs of the changes: (+4 -1) PPCInstr64Bit.td |5 - 1 files changed, 4 insertions(+), 1 deletion(-) Index: llvm/lib/Target/PowerPC/P

[llvm-commits] CVS: llvm/test/CodeGen/PowerPC/2007-03-24-cntlzd.ll

2007-03-24 Thread Chris Lattner
Changes in directory llvm/test/CodeGen/PowerPC: 2007-03-24-cntlzd.ll added (r1.1) --- Log message: test that the ppc backend can do 64-bit cntlz --- Diffs of the changes: (+13 -0) 2007-03-24-cntlzd.ll | 13 + 1 files changed, 13 insertions(+) Index: llvm/test/CodeGen/PowerP

[llvm-commits] CVS: llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp

2007-03-24 Thread Chris Lattner
Changes in directory llvm/lib/CodeGen/SelectionDAG: TargetLowering.cpp updated: 1.101 -> 1.102 --- Log message: implement initial support for the silly X constraint. Testcase here: CodeGen/X86/2007-03-24-InlineAsmXConstraint.ll --- Diffs of the changes: (+2 -0) TargetLowering.cpp |2

[llvm-commits] CVS: llvm/test/CodeGen/X86/2007-03-24-InlineAsmXConstraint.ll

2007-03-24 Thread Chris Lattner
Changes in directory llvm/test/CodeGen/X86: 2007-03-24-InlineAsmXConstraint.ll added (r1.1) --- Log message: new testcase --- Diffs of the changes: (+9 -0) 2007-03-24-InlineAsmXConstraint.ll |9 + 1 files changed, 9 insertions(+) Index: llvm/test/CodeGen/X86/2007-03-24-Inline

[llvm-commits] CVS: llvm/lib/Transforms/Scalar/InstructionCombining.cpp

2007-03-24 Thread Reid Spencer
Changes in directory llvm/lib/Transforms/Scalar: InstructionCombining.cpp updated: 1.685 -> 1.686 --- Log message: Make more uses of getHighBitsSet and get rid of some pointless & of an APInt with its type mask. --- Diffs of the changes: (+12 -12) InstructionCombining.cpp | 24 ++

[llvm-commits] [125328] Improve CanonicalizeConstraint to support canonicalization of multiple-alternative inline asm constraints , e.g., turn:

2007-03-24 Thread clattner
Revision: 125328 Author: clattner Date: 2007-03-24 21:02:59 -0700 (Sat, 24 Mar 2007) Log Message: --- Improve CanonicalizeConstraint to support canonicalization of multiple-alternative inline asm constraints, e.g., turn: __asm__ volatile("inw %w1, %w0" : "=a" (datum) : "Nd" (port))

[llvm-commits] [125327] use a correct substitute for the 'g' constraint, now that it is safe.

2007-03-24 Thread clattner
Revision: 125327 Author: clattner Date: 2007-03-24 20:39:48 -0700 (Sat, 24 Mar 2007) Log Message: --- use a correct substitute for the 'g' constraint, now that it is safe. Modified Paths: -- apple-local/branches/llvm/gcc/llvm-convert.cpp Modified: apple-local/branch

[llvm-commits] CVS: llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp

2007-03-24 Thread Chris Lattner
Changes in directory llvm/lib/CodeGen/SelectionDAG: TargetLowering.cpp updated: 1.100 -> 1.101 --- Log message: Implement CodeGen/X86/2007-03-24-InlineAsmMultiRegConstraint.ll --- Diffs of the changes: (+4 -1) TargetLowering.cpp |5 - 1 files changed, 4 insertions(+), 1 deletion(-

[llvm-commits] CVS: llvm/test/CodeGen/X86/2007-03-24-InlineAsmMultiRegConstraint.ll

2007-03-24 Thread Chris Lattner
Changes in directory llvm/test/CodeGen/X86: 2007-03-24-InlineAsmMultiRegConstraint.ll added (r1.1) --- Log message: new testcase --- Diffs of the changes: (+11 -0) 2007-03-24-InlineAsmMultiRegConstraint.ll | 11 +++ 1 files changed, 11 insertions(+) Index: llvm/test/CodeGen/X86

[llvm-commits] CVS: llvm/lib/Target/PowerPC/PPCISelLowering.cpp PPCISelLowering.h

2007-03-24 Thread Chris Lattner
Changes in directory llvm/lib/Target/PowerPC: PPCISelLowering.cpp updated: 1.262 -> 1.263 PPCISelLowering.h updated: 1.62 -> 1.63 --- Log message: switch TargetLowering::getConstraintType to take the entire constraint, not just the first letter. No functionality change. --- Diffs of the chan

[llvm-commits] CVS: llvm/lib/Target/Alpha/AlphaISelLowering.cpp AlphaISelLowering.h

2007-03-24 Thread Chris Lattner
Changes in directory llvm/lib/Target/Alpha: AlphaISelLowering.cpp updated: 1.84 -> 1.85 AlphaISelLowering.h updated: 1.24 -> 1.25 --- Log message: switch TargetLowering::getConstraintType to take the entire constraint, not just the first letter. No functionality change. --- Diffs of the chan

[llvm-commits] CVS: llvm/lib/Target/ARM/ARMISelLowering.cpp ARMISelLowering.h

2007-03-24 Thread Chris Lattner
Changes in directory llvm/lib/Target/ARM: ARMISelLowering.cpp updated: 1.29 -> 1.30 ARMISelLowering.h updated: 1.7 -> 1.8 --- Log message: switch TargetLowering::getConstraintType to take the entire constraint, not just the first letter. No functionality change. --- Diffs of the changes: (+

[llvm-commits] CVS: llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp TargetLowering.cpp

2007-03-24 Thread Chris Lattner
Changes in directory llvm/lib/CodeGen/SelectionDAG: SelectionDAGISel.cpp updated: 1.391 -> 1.392 TargetLowering.cpp updated: 1.99 -> 1.100 --- Log message: switch TargetLowering::getConstraintType to take the entire constraint, not just the first letter. No functionality change. --- Diffs of

[llvm-commits] CVS: llvm/lib/Target/X86/X86ISelLowering.cpp X86ISelLowering.h

2007-03-24 Thread Chris Lattner
Changes in directory llvm/lib/Target/X86: X86ISelLowering.cpp updated: 1.376 -> 1.377 X86ISelLowering.h updated: 1.93 -> 1.94 --- Log message: switch TargetLowering::getConstraintType to take the entire constraint, not just the first letter. No functionality change. --- Diffs of the changes:

[llvm-commits] CVS: llvm/include/llvm/Target/TargetLowering.h

2007-03-24 Thread Chris Lattner
Changes in directory llvm/include/llvm/Target: TargetLowering.h updated: 1.115 -> 1.116 --- Log message: switch TargetLowering::getConstraintType to take the entire constraint, not just the first letter. No functionality change. --- Diffs of the changes: (+3 -3) TargetLowering.h |6 ++

[llvm-commits] CVS: llvm/lib/Transforms/Scalar/InstructionCombining.cpp

2007-03-24 Thread Reid Spencer
Changes in directory llvm/lib/Transforms/Scalar: InstructionCombining.cpp updated: 1.684 -> 1.685 --- Log message: More APIntification: * 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 recur

[llvm-commits] CVS: llvm/lib/Target/X86/X86ATTAsmPrinter.cpp

2007-03-24 Thread Chris Lattner
Changes in directory llvm/lib/Target/X86: X86ATTAsmPrinter.cpp updated: 1.98 -> 1.99 --- Log message: Allow the b/h/w/k constraints to be applied to values that have multiple alternatives, and end up not being registers. --- Diffs of the changes: (+4 -1) X86ATTAsmPrinter.cpp |5 -

[llvm-commits] CVS: llvm/lib/Target/X86/X86ISelLowering.cpp

2007-03-24 Thread Chris Lattner
Changes in directory llvm/lib/Target/X86: X86ISelLowering.cpp updated: 1.375 -> 1.376 --- Log message: enforce the proper range for the i386 N constraint. --- Diffs of the changes: (+9 -8) X86ISelLowering.cpp | 17 + 1 files changed, 9 insertions(+), 8 deletions(-) Inde

[llvm-commits] [125326] fix in 80 cols

2007-03-24 Thread clattner
Revision: 125326 Author: clattner Date: 2007-03-24 18:47:34 -0700 (Sat, 24 Mar 2007) Log Message: --- fix in 80 cols Modified Paths: -- apple-local/branches/llvm/gcc/llvm-types.cpp Modified: apple-local/branches/llvm/gcc/llvm-types.cpp ==

[llvm-commits] CVS: llvm/lib/Target/X86/X86ATTAsmPrinter.cpp

2007-03-24 Thread Chris Lattner
Changes in directory llvm/lib/Target/X86: X86ATTAsmPrinter.cpp updated: 1.97 -> 1.98 --- Log message: Fix test/CodeGen/X86/2007-03-24-InlineAsmPModifier.ll --- Diffs of the changes: (+4 -0) X86ATTAsmPrinter.cpp |4 1 files changed, 4 insertions(+) Index: llvm/lib/Target/X86/X86A

[llvm-commits] CVS: llvm/test/CodeGen/X86/2007-03-24-InlineAsmPModifier.ll

2007-03-24 Thread Chris Lattner
Changes in directory llvm/test/CodeGen/X86: 2007-03-24-InlineAsmPModifier.ll added (r1.1) --- Log message: new testcase --- Diffs of the changes: (+10 -0) 2007-03-24-InlineAsmPModifier.ll | 10 ++ 1 files changed, 10 insertions(+) Index: llvm/test/CodeGen/X86/2007-03-24-InlineA

[llvm-commits] [125325] work around a latent bug, until it can be fixed properly.

2007-03-24 Thread clattner
Revision: 125325 Author: clattner Date: 2007-03-24 18:30:48 -0700 (Sat, 24 Mar 2007) Log Message: --- work around a latent bug, until it can be fixed properly. Modified Paths: -- apple-local/branches/llvm/gcc/llvm-types.cpp Modified: apple-local/branches/llvm/gcc/ll

[llvm-commits] CVS: llvm/include/llvm/ADT/APInt.h

2007-03-24 Thread Reid Spencer
Changes in directory llvm/include/llvm/ADT: APInt.h updated: 1.56 -> 1.57 --- Log message: Fix a typo in a comment. --- Diffs of the changes: (+1 -1) APInt.h |2 +- 1 files changed, 1 insertion(+), 1 deletion(-) Index: llvm/include/llvm/ADT/APInt.h diff -u llvm/include/llvm/ADT/APInt

Re: [llvm-commits] SwitchLowering refactoring patch for review

2007-03-24 Thread Chris Lattner
On Mar 20, 2007, at 9:29 AM, Anton Korobeynikov wrote: This is the first patch targeting switch lowering refactoring as indicated in PR926. oooh! Currently it implements "worklist" strategy, where we're deciding either emit JT or split the case range or each step (not only in the early begi

[llvm-commits] CVS: llvm/include/llvm/ADT/APInt.h

2007-03-24 Thread Reid Spencer
Changes in directory llvm/include/llvm/ADT: APInt.h updated: 1.55 -> 1.56 --- Log message: Actually, for getHighBitsSet and getLowBitsSet, don't make a 0 bit size illegal. Instead do the 0 valued construction for the user. This is because the caller may not know (or care to check) that the numb

[llvm-commits] CVS: llvm/lib/Transforms/Scalar/InstructionCombining.cpp

2007-03-24 Thread Chris Lattner
Changes in directory llvm/lib/Transforms/Scalar: InstructionCombining.cpp updated: 1.683 -> 1.684 --- Log message: fix a regression on vector or instructions. --- Diffs of the changes: (+9 -9) InstructionCombining.cpp | 18 +- 1 files changed, 9 insertions(+), 9 deletions

Re: [llvm-commits] CVS: llvm/lib/CodeGen/README.txt

2007-03-24 Thread Chris Lattner
On Mar 20, 2007, at 3:22 PM, Evan Cheng wrote: > Potential spiller improvement. > > Index: llvm/lib/CodeGen/README.txt > diff -c /dev/null llvm/lib/CodeGen/README.txt:1.1 > *** /dev/null Tue Mar 20 17:22:48 2007 > --- llvm/lib/CodeGen/README.txt Tue Mar 20 17:22:38 2007 > *** > **

Re: [llvm-commits] [125160] Better support for variable size struct fields.

2007-03-24 Thread Chris Lattner
On Mar 21, 2007, at 1:52 PM, Lauro Ramos Venancio wrote: > Something in this patch broke the llvm-gcc compilation on arm-linux: Is this already fixed? If not, Duncan, can you please investigate? Lauro, can you try to reduce a .i file? Thanks, -Chris > /home/laurov/llvm/llvm-gcc/build/gcc/xg

[llvm-commits] CVS: llvm/include/llvm/ADT/APInt.h

2007-03-24 Thread Reid Spencer
Changes in directory llvm/include/llvm/ADT: APInt.h updated: 1.54 -> 1.55 --- Log message: Make it illegal to set 0 bits in getHighBitsSet and getLowBitsSet. For that they should have used the uint64_t constructor. This avoids causing undefined results via shifts by the word size when the bit

[llvm-commits] CVS: llvm/include/llvm/ADT/APInt.h

2007-03-24 Thread Reid Spencer
Changes in directory llvm/include/llvm/ADT: APInt.h updated: 1.53 -> 1.54 --- Log message: In the getBitsSet function, don't optimize for a common case that is already covered by getLowBitsSet (i.e. when loBits==0). Consequently, remove the default value for loBits and reorder the arguments to

Re: [llvm-commits] CVS: llvm/include/llvm/ADT/APInt.h

2007-03-24 Thread Chris Lattner
On Mar 24, 2007, at 4:37 PM, Reid Spencer wrote: > On Sat, 2007-03-24 at 16:31 -0700, Chris Lattner wrote: >>>/// @param loBit the index of the lowest bit set. >>>/// @returns An APInt value with the requested bits set. >>>/// @brief Get a value with a block of bits set. >>> - static

Re: [llvm-commits] CVS: llvm/include/llvm/ADT/APInt.h

2007-03-24 Thread Chris Lattner
On Mar 24, 2007, at 4:36 PM, Reid Spencer wrote: >/// @brief Get a value with high bits set >static APInt getHighBitsSet(uint32_t numBits, uint32_t hiBitsSet) { > assert(hiBitsSet <= numBits && "Too many bits to set!"); > -uint32_t mvBits = numBits - hiBitsSet; > +uint32_t shi

Re: [llvm-commits] CVS: llvm/include/llvm/Support/MathExtras.h

2007-03-24 Thread Chris Lattner
On Mar 22, 2007, at 1:18 PM, Reid Spencer wrote: > On Thu, 2007-03-22 at 12:35 -0700, Jeff Cohen wrote: >> How is it any worse than checking for GCC? > > I don't like that either :) FWIW, I don't see anything wrong with Jeff's change. MathExtras may be suboptimal w.r.t to libsystem, but so is

Re: [llvm-commits] CVS: llvm/include/llvm/ADT/APInt.h

2007-03-24 Thread Reid Spencer
On Sat, 2007-03-24 at 16:31 -0700, Chris Lattner wrote: > >/// @param loBit the index of the lowest bit set. > >/// @returns An APInt value with the requested bits set. > >/// @brief Get a value with a block of bits set. > > - static APInt getBitsSet(uint32_t numBits, uint32_t hiBit,

[llvm-commits] CVS: llvm/include/llvm/ADT/APInt.h

2007-03-24 Thread Reid Spencer
Changes in directory llvm/include/llvm/ADT: APInt.h updated: 1.52 -> 1.53 --- Log message: Don't invoke undefined behavior in shifts in the functions getHighBitsSet and getLowBitsSet. --- Diffs of the changes: (+6 -6) APInt.h | 12 ++-- 1 files changed, 6 insertions(+), 6 deleti

Re: [llvm-commits] CVS: llvm/lib/Target/X86/README-MMX.txt README-SSE.txt X86ISelLowering.cpp X86InstrMMX.td

2007-03-24 Thread Chris Lattner
On Mar 22, 2007, at 11:43 AM, Bill Wendling wrote: > +We should compile this: > + > +#include > + > +void foo(__m128i *A, __m128i *B) { > + *A = _mm_sll_epi16 (*A, *B); > +} > + > +to: > + > +_foo: > + subl$12, %esp > + movl16(%esp), %edx > + movl20(%esp), %eax > + m

Re: [llvm-commits] CVS: llvm/include/llvm/ADT/APInt.h

2007-03-24 Thread Chris Lattner
>/// @param loBit the index of the lowest bit set. >/// @returns An APInt value with the requested bits set. >/// @brief Get a value with a block of bits set. > - static APInt getBitsSet(uint32_t numBits, uint32_t hiBit, > uint32_t loBit = 0); > + static APInt getBitsSet(uint32_t n

[llvm-commits] CVS: llvm/include/llvm/ADT/APInt.h

2007-03-24 Thread Reid Spencer
Changes in directory llvm/include/llvm/ADT: APInt.h updated: 1.51 -> 1.52 --- Log message: Implement the getBitsSet function. --- Diffs of the changes: (+10 -1) APInt.h | 11 ++- 1 files changed, 10 insertions(+), 1 deletion(-) Index: llvm/include/llvm/ADT/APInt.h diff -u llvm/

Re: [llvm-commits] CVS: llvm/lib/Transforms/Scalar/InstructionCombining.cpp

2007-03-24 Thread Chris Lattner
> @@ -2961,11 +2961,10 @@ >if (CI->isAllOnesValue()) // X * -1 == 0 - X > return BinaryOperator::createNeg(Op0, I.getName()); > > - int64_t Val = (int64_t)cast(CI)->getZExtValue(); > - if (isPowerOf2_64(Val)) { // Replace X*(2^C) with X > << C > -

Re: [llvm-commits] CVS: llvm/include/llvm/ADT/APInt.h

2007-03-24 Thread Chris Lattner
> Implement the getHighBitsSet and getLowBitsSet functions. >/// @param numBits the bitwidth of the result >/// @param hiBitsSet the number of high-order bits set in the > result. >/// @brief Get a value with high bits set > - static APInt getHighBitsSet(uint32_t numBits, uint32_t h

Re: [llvm-commits] CVS: llvm/test/Transforms/InstCombine/APInt/

2007-03-24 Thread Chris Lattner
On Mar 24, 2007, at 4:05 PM, Reid Spencer wrote: > On Sat, 2007-03-24 at 15:56 -0700, Chris Lattner wrote: This is a temporary convenience while you're working on apint'ifying instcombine. This will not be useful once you're done. >>> >>> Okay, that's fine. Could you please copy

Re: [llvm-commits] CVS: llvm/lib/Transforms/Scalar/InstructionCombining.cpp

2007-03-24 Thread Chris Lattner
On Mar 23, 2007, at 11:46 AM, Reid Spencer wrote: >// shl uint X, 32 = 0 and shr ubyte Y, 9 = 0, ... just don't > eliminate shr >// of a signed value. >// > - unsigned TypeBits = Op0->getType()->getPrimitiveSizeInBits(); > - if (Op1->getZExtValue() >= TypeBits) { > + if (Op1->getZE

[llvm-commits] CVS: llvm/test/Transforms/InstCombine/APInt/.cvsignore dg.exp

2007-03-24 Thread LLVM
Changes in directory llvm/test/Transforms/InstCombine/APInt: .cvsignore (r1.1) removed dg.exp (r1.1) removed --- Log message: Remove the last vestiges of this directory. --- Diffs of the changes: (+0 -0) 0 files changed ___ llvm-commits mailin

Re: [llvm-commits] CVS: llvm/test/Transforms/InstCombine/APInt/

2007-03-24 Thread Reid Spencer
On Sat, 2007-03-24 at 15:56 -0700, Chris Lattner wrote: > >> This is a temporary convenience while you're working on apint'ifying > >> instcombine. This will not be useful once you're done. > > > > Okay, that's fine. Could you please copy all the ,v files from the > > InstCombine/APInt files up on

[llvm-commits] CVS: llvm/include/llvm/ADT/APInt.h

2007-03-24 Thread Reid Spencer
Changes in directory llvm/include/llvm/ADT: APInt.h updated: 1.50 -> 1.51 --- Log message: Implement the getHighBitsSet and getLowBitsSet functions. --- Diffs of the changes: (+16 -2) APInt.h | 18 -- 1 files changed, 16 insertions(+), 2 deletions(-) Index: llvm/include

Re: [llvm-commits] CVS: llvm/test/Transforms/InstCombine/APInt/

2007-03-24 Thread Chris Lattner
>> This is a temporary convenience while you're working on apint'ifying >> instcombine. This will not be useful once you're done. > > Okay, that's fine. Could you please copy all the ,v files from the > InstCombine/APInt files up one level, being sure not to overwrite any > existing ones of the sa

Re: [llvm-commits] CVS: llvm/lib/Transforms/Scalar/InstructionCombining.cpp

2007-03-24 Thread Chris Lattner
> @@ -4373,9 +4374,10 @@ > >// See if we can simplify any instructions used by the > instruction whose sole >// purpose is to compute bits we don't care about. > - uint64_t KnownZero, KnownOne; > + uint32_t BitWidth = cast(I.getType())->getBitWidth(); This is an important regression fo

[llvm-commits] CVS: llvm/include/llvm/ADT/APInt.h

2007-03-24 Thread Reid Spencer
Changes in directory llvm/include/llvm/ADT: APInt.h updated: 1.49 -> 1.50 --- Log message: Get the signs in the right place! --- Diffs of the changes: (+1 -1) APInt.h |2 +- 1 files changed, 1 insertion(+), 1 deletion(-) Index: llvm/include/llvm/ADT/APInt.h diff -u llvm/include/llvm/

Re: [llvm-commits] CVS: llvm/lib/Transforms/Scalar/InstructionCombining.cpp

2007-03-24 Thread Chris Lattner
On Mar 22, 2007, at 1:57 PM, Reid Spencer wrote: > @@ -7008,10 +7008,8 @@ >case Instruction::ZExt: { > // We need to emit an AND to clear the high bits. > assert(SrcBitSize < DestBitSize && "Not a zext?"); > -Constant *C = > - ConstantInt::get(Type::Int64

[llvm-commits] CVS: llvm/docs/LangRef.html

2007-03-24 Thread Reid Spencer
Changes in directory llvm/docs: LangRef.html updated: 1.215 -> 1.216 --- Log message: Fix a link. --- Diffs of the changes: (+2 -2) LangRef.html |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) Index: llvm/docs/LangRef.html diff -u llvm/docs/LangRef.html:1.215 llvm/docs/Lang

[llvm-commits] CVS: llvm/include/llvm/ADT/APInt.h

2007-03-24 Thread Reid Spencer
Changes in directory llvm/include/llvm/ADT: APInt.h updated: 1.48 -> 1.49 --- Log message: Undo the last change and make this really implement remainder and not modulus. The previous change was a result of incorrect documentation in the LangRef.html. --- Diffs of the changes: (+6 -4) APInt

[llvm-commits] CVS: llvm/test/Integer/a15.ll.out a17.ll.out a31.ll.out a33.ll.out a63.ll.out a7.ll.out a9.ll.out

2007-03-24 Thread Reid Spencer
Changes in directory llvm/test/Integer: a15.ll.out updated: 1.6 -> 1.7 a17.ll.out updated: 1.6 -> 1.7 a31.ll.out updated: 1.6 -> 1.7 a33.ll.out updated: 1.6 -> 1.7 a63.ll.out updated: 1.6 -> 1.7 a7.ll.out updated: 1.7 -> 1.8 a9.ll.out updated: 1.6 -> 1.7 --- Log message: Flip the srem tests aro

Re: [llvm-commits] CVS: llvm/test/Transforms/InstCombine/APInt/

2007-03-24 Thread Reid Spencer
On Sat, 2007-03-24 at 15:26 -0700, Chris Lattner wrote: > >> Hrm? Why a subdirectory? > > > > Three reasons: > > 1. Many of the tests are similar but just modified for APInt. So > > instead > > of having > >sext-apint.ll and zext-apint.ll and or-apint.ll, etc., I just > > factored the name >

Re: [llvm-commits] CVS: llvm/test/Transforms/InstCombine/APInt/

2007-03-24 Thread Chris Lattner
>> Hrm? Why a subdirectory? > > Three reasons: > 1. Many of the tests are similar but just modified for APInt. So > instead > of having >sext-apint.ll and zext-apint.ll and or-apint.ll, etc., I just > factored the name >out into a directory. Also reduces clutter in the > test/Transforms/

[llvm-commits] CVS: llvm/docs/LangRef.html

2007-03-24 Thread Reid Spencer
Changes in directory llvm/docs: LangRef.html updated: 1.214 -> 1.215 --- Log message: Correct the description of srem. remainder follows the dividend not the divisor! --- Diffs of the changes: (+7 -5) LangRef.html | 12 +++- 1 files changed, 7 insertions(+), 5 deletions(-) Inde

Re: [llvm-commits] CVS: llvm/test/Integer/a1.ll a1.ll.out a15.ll a15.ll.out a17.ll a17.ll.out a31.ll a31.ll.out a33.ll a33.ll.out a63.ll.out a7.ll.out a9.ll.out

2007-03-24 Thread Reid Spencer
Hi Duncan, On Sat, 2007-03-24 at 23:10 +0100, Duncan Sands wrote: > > Fix incorrect test cases for srem. The definition of srem is a remainder so > > that the sign of the result follows the sign of the divisor. > > In "A rem B", I hope you mean A when you talk of the divisor! > Because > A rem

Re: [llvm-commits] CVS: llvm/lib/Transforms/Scalar/InstructionCombining.cpp

2007-03-24 Thread Chris Lattner
>>> Make some codes more efficient. >>> >>> @@ -5813,7 +5816,6 @@ >>>case 16 : SExtType = Type::Int16Ty; break; >>>case 32 : SExtType = Type::Int32Ty; break; >>>case 64 : SExtType = Type::Int64Ty; break; >>> - case 128: SExtType = IntegerType::get(128); break; >>>

Re: [llvm-commits] CVS: llvm/test/Integer/a1.ll a1.ll.out a15.ll a15.ll.out a17.ll a17.ll.out a31.ll a31.ll.out a33.ll a33.ll.out a63.ll.out a7.ll.out a9.ll.out

2007-03-24 Thread Duncan Sands
> Fix incorrect test cases for srem. The definition of srem is a remainder so > that the sign of the result follows the sign of the divisor. In "A rem B", I hope you mean A when you talk of the divisor! Because A rem B has the sign of A (unless B exactly divides A, in which case the sign is zero)

[llvm-commits] CVS: llvm/include/llvm/ADT/APInt.h

2007-03-24 Thread Reid Spencer
Changes in directory llvm/include/llvm/ADT: APInt.h updated: 1.47 -> 1.48 --- Log message: Correct the implementation of srem to be remainder, not modulus. The sign of the result must follow the sign of the divisor. --- Diffs of the changes: (+2 -2) APInt.h |4 ++-- 1 files changed, 2

[llvm-commits] CVS: llvm/test/Integer/a1.ll a1.ll.out a15.ll a15.ll.out a17.ll a17.ll.out a31.ll a31.ll.out a33.ll a33.ll.out a63.ll.out a7.ll.out a9.ll.out

2007-03-24 Thread Reid Spencer
Changes in directory llvm/test/Integer: a1.ll updated: 1.6 -> 1.7 a1.ll.out updated: 1.5 -> 1.6 a15.ll updated: 1.5 -> 1.6 a15.ll.out updated: 1.5 -> 1.6 a17.ll updated: 1.5 -> 1.6 a17.ll.out updated: 1.5 -> 1.6 a31.ll updated: 1.5 -> 1.6 a31.ll.out updated: 1.5 -> 1.6 a33.ll updated: 1.5 -> 1.6

Re: [llvm-commits] CVS: llvm/lib/Transforms/Scalar/InstructionCombining.cpp

2007-03-24 Thread Reid Spencer
On Sat, 2007-03-24 at 10:06 -0700, Chris Lattner wrote: > On Mar 24, 2007, at 8:34 AM, Zhou Sheng wrote: > > > > > > > Changes in directory llvm/lib/Transforms/Scalar: > > > > InstructionCombining.cpp updated: 1.682 -> 1.683 > > --- > > Log message: > > > > Make some codes more efficient. > > > >

[llvm-commits] CVS: llvm/include/llvm/ADT/APInt.h

2007-03-24 Thread Reid Spencer
Changes in directory llvm/include/llvm/ADT: APInt.h updated: 1.46 -> 1.47 --- Log message: Clean up this interface: 1. Group similar methods into doxygen groups 2. Reorganize the groups into a consist flow. 3. Significantly improve the quality of the documentation on several methods 4. Rewrite

[llvm-commits] CVS: llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp

2007-03-24 Thread Chris Lattner
Changes in directory llvm/lib/CodeGen/SelectionDAG: LegalizeDAG.cpp updated: 1.484 -> 1.485 --- Log message: don't rely on ADL --- Diffs of the changes: (+1 -1) LegalizeDAG.cpp |2 +- 1 files changed, 1 insertion(+), 1 deletion(-) Index: llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp

[llvm-commits] CVS: llvm/include/llvm/CodeGen/ValueTypes.h ValueTypes.td

2007-03-24 Thread Chris Lattner
Changes in directory llvm/include/llvm/CodeGen: ValueTypes.h updated: 1.29 -> 1.30 ValueTypes.td updated: 1.2 -> 1.3 --- Log message: add a valuetype for v1i64, which is needed by mmx. --- Diffs of the changes: (+34 -27) ValueTypes.h | 45 + V

[llvm-commits] CVS: llvm/lib/VMCore/ValueTypes.cpp

2007-03-24 Thread Chris Lattner
Changes in directory llvm/lib/VMCore: ValueTypes.cpp updated: 1.14 -> 1.15 --- Log message: add a valuetype for v1i64, which is needed by mmx. --- Diffs of the changes: (+3 -0) ValueTypes.cpp |3 +++ 1 files changed, 3 insertions(+) Index: llvm/lib/VMCore/ValueTypes.cpp diff -u llvm/

Re: [llvm-commits] CVS: llvm/lib/Transforms/Scalar/InstructionCombining.cpp

2007-03-24 Thread Chris Lattner
On Mar 24, 2007, at 8:34 AM, Zhou Sheng wrote: > > > Changes in directory llvm/lib/Transforms/Scalar: > > InstructionCombining.cpp updated: 1.682 -> 1.683 > --- > Log message: > > Make some codes more efficient. > > @@ -5813,7 +5816,6 @@ >case 16 : SExtType = Type::Int16Ty; break; >

[llvm-commits] CVS: llvm/lib/Transforms/Scalar/InstructionCombining.cpp

2007-03-24 Thread Zhou Sheng
Changes in directory llvm/lib/Transforms/Scalar: InstructionCombining.cpp updated: 1.682 -> 1.683 --- Log message: Make some codes more efficient. --- Diffs of the changes: (+17 -15) InstructionCombining.cpp | 32 +--- 1 files changed, 17 insertions(+), 15 del