[llvm-commits] [llvm] r148929 - in /llvm/trunk/lib: CodeGen/SelectionDAG/LegalizeDAG.cpp Target/X86/X86ISelLowering.cpp Transforms/InstCombine/InstCombineMulDivRem.cpp Transforms/InstCombine/InstCombineSimplifyDemanded.cpp Transforms/Scalar/Scala

Chris Lattner sabre at nondot.org
Wed Jan 25 02:00:37 PST 2012


On Jan 24, 2012, at 11:42 PM, Eli Friedman wrote:

> On Tue, Jan 24, 2012 at 10:02 PM, Chris Lattner <sabre at nondot.org> wrote:
>> Author: lattner
>> Date: Wed Jan 25 00:02:56 2012
>> New Revision: 148929
>> 
>> URL: http://llvm.org/viewvc/llvm-project?rev=148929&view=rev
>> Log:
>> use ConstantVector::getSplat in a few places.
> 
> [...]
> 
>> -  SmallVector<Constant*,2> CV1;
>> -  CV1.push_back(
>> -    ConstantFP::get(*Context, APFloat(APInt(64, 0x4330000000000000ULL))));
>> -  CV1.push_back(
>> -    ConstantFP::get(*Context, APFloat(APInt(64, 0x4530000000000000ULL))));
>> -  Constant *C1 = ConstantVector::get(CV1);
>> +  Constant *C1 = ConstantVector::getSplat(2,
>> +        ConstantFP::get(*Context, APFloat(APInt(64, 0x4330000000000000ULL))));
>>   SDValue CPIdx1 = DAG.getConstantPool(C1, getPointerTy(), 16);
> 
> This change doesn't appear to preserve the semantics.

Whoa, great catch!  Fixed in r148947.  Many thanks,

-Chris



More information about the llvm-commits mailing list