[llvm-commits] [llvm] r73431 - in /llvm/trunk: include/llvm/ include/llvm/Analysis/ lib/Analysis/ lib/Transforms/Instrumentation/ lib/Transforms/Scalar/ lib/VMCore/ test/Feature/ test/Transforms/InstCombine/

Dan Gohman gohman at apple.com
Mon Jun 15 16:33:28 PDT 2009


On Jun 15, 2009, at 4:13 PM, Chris Lattner wrote:


>
> On Jun 15, 2009, at 3:12 PM, Dan Gohman wrote:
>
>
>> Author: djg
>>
>> Date: Mon Jun 15 17:12:54 2009
>>
>> New Revision: 73431
>>
>>
>>
>> URL: http://llvm.org/viewvc/llvm-project?rev=73431&view=rev
>>
>> Log:
>>
>> Support vector casts in more places, fixing a variety of assertion
>>
>> failures.
>>
>>
>>
>> To support this, add some utility functions to Type to help support
>>
>> vector/scalar-independent code. Change ConstantInt::get and
>>
>> ConstantFP::get to support vector types, and add an overload to
>>
>> ConstantInt::get that uses a static IntegerType type, for
>>
>> convenience.
>>
>
> Hi Dan,
>
> Why should ConstantInt/FP::get allow a vector operand?  It seems very
> strange to me to allow this.

It's a convenience for code that handles both vector and scalar
values. In the same sense that the vector form of an add is an
add that applies to each element of a vector, the vector form
of a constant is a constant vector with each element equal to
the constant.

> In general, please split up logically distinct changes into different
> pieces, it would be nice to have the core IR changes separately from
> the SCEV changes,

The SCEV changes here were needed in order to conform to
the core IR API changes.

Dan




More information about the llvm-commits mailing list