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

2007-03-26 Thread Reid Spencer
Changes in directory llvm/lib/VMCore: ConstantFold.cpp updated: 1.149 - 1.150 --- Log message: Add a comment to explain a folding transform. --- Diffs of the changes: (+1 -0) ConstantFold.cpp |1 + 1 files changed, 1 insertion(+) Index: llvm/lib/VMCore/ConstantFold.cpp diff -u

[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/VMCore/ConstantFold.cpp

2007-03-22 Thread Reid Spencer
Changes in directory llvm/lib/VMCore: ConstantFold.cpp updated: 1.147 - 1.148 --- Log message: Fix constant fold of div by zero and rem by zero to match IEEE 754 requirements. We must return NaN in some cases and correctly signed infinity in other cases. Passes CFP2006 (not that that says

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

2007-03-03 Thread Reid Spencer
Changes in directory llvm/lib/VMCore: ConstantFold.cpp updated: 1.146 - 1.147 --- Log message: Fix constant folding of fp-int bitcast for vectors. --- Diffs of the changes: (+2 -2) ConstantFold.cpp |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) Index:

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

2007-03-01 Thread Reid Spencer
Changes in directory llvm/lib/VMCore: ConstantFold.cpp updated: 1.143 - 1.144 --- Log message: Use a simpler constructor when constructing ConstantInst. --- Diffs of the changes: (+19 -20) ConstantFold.cpp | 39 +++ 1 files changed, 19 insertions(+),

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

2007-03-01 Thread Reid Spencer
Changes in directory llvm/lib/VMCore: ConstantFold.cpp updated: 1.144 - 1.145 --- Log message: Use the APInt versions of the bit-wise conversions of float/double to int and back. While this is not strictly necessary, it does pave the way for future changes in casting. It should now be possible

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

2007-03-01 Thread Reid Spencer
Changes in directory llvm/lib/VMCore: ConstantFold.cpp updated: 1.145 - 1.146 --- Log message: Prefer non-virtual calls to ConstantInt::isZero over virtual calls to Constant::isNullValue() in situations where it is possible. --- Diffs of the changes: (+6 -6) ConstantFold.cpp | 12

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

2007-02-27 Thread Chris Lattner
On Feb 26, 2007, at 10:24 PM, Reid Spencer wrote: case Instruction::FPToUI: -if (const ConstantFP *FPC = dyn_castConstantFP(V)) - return ConstantInt::get(DestTy,(uint64_t) FPC-getValue()); +if (const ConstantFP *FPC = dyn_castConstantFP(V)) { + APInt

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

2007-02-27 Thread Reid Spencer
On Tue, 2007-02-27 at 09:08 -0800, Chris Lattner wrote: On Feb 26, 2007, at 10:24 PM, Reid Spencer wrote: case Instruction::FPToUI: -if (const ConstantFP *FPC = dyn_castConstantFP(V)) - return ConstantInt::get(DestTy,(uint64_t) FPC-getValue()); +if (const ConstantFP *FPC

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

2007-02-27 Thread Reid Spencer
Changes in directory llvm/lib/VMCore: ConstantFold.cpp updated: 1.140 - 1.141 --- Log message: For PR1205: http://llvm.org/PR1205 : Implement review feedback: 1. Use new APInt::RoundDoubleToAPInt interface to specify the bit width so that we don't have to truncate or extend in constant

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

2007-02-27 Thread Chris Lattner
This seems like a poor choice of API. RoundDoubleToAPInt should take a result bitwidth. Without this, this appears like it could make a large APInt, then truncate it down to a small one when converting from double, which is very inefficient. Done. Thanks, but why the default argument?

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

2007-02-27 Thread Reid Spencer
Changes in directory llvm/lib/VMCore: ConstantFold.cpp updated: 1.142 - 1.143 --- Log message: Pull out the stops. --- Diffs of the changes: (+2 -4) ConstantFold.cpp |6 ++ 1 files changed, 2 insertions(+), 4 deletions(-) Index: llvm/lib/VMCore/ConstantFold.cpp diff -u

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

2007-02-27 Thread Reid Spencer
On Tue, 2007-02-27 at 14:17 -0800, Chris Lattner wrote: This seems like a poor choice of API. RoundDoubleToAPInt should take a result bitwidth. Without this, this appears like it could make a large APInt, then truncate it down to a small one when converting from double, which is very

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

2007-02-27 Thread Chris Lattner
On Feb 27, 2007, at 3:35 PM, Reid Spencer wrote: On Tue, 2007-02-27 at 14:17 -0800, Chris Lattner wrote: This seems like a poor choice of API. RoundDoubleToAPInt should take a result bitwidth. Without this, this appears like it could make a large APInt, then truncate it down to a small

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

2007-02-26 Thread Chris Lattner
Changes in directory llvm/lib/VMCore: ConstantFold.cpp updated: 1.138 - 1.139 Constants.cpp updated: 1.221 - 1.222 ConstantFolding.h (r1.53) removed --- Log message: ConstantFolding.cpp/h - ConstantFold.cpp/h to avoid confusion with lib/Analysis/ConstantFolding. --- Diffs of the changes:

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

2007-02-26 Thread Reid Spencer
Changes in directory llvm/lib/VMCore: ConstantFold.cpp updated: 1.139 - 1.140 --- Log message: For PR1205: http://llvm.org/PR1205 : Implement constant folding via APInt instead of uint64_t. --- Diffs of the changes: (+135 -102) ConstantFold.cpp | 237