[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/

Chris Lattner clattner at apple.com
Mon Jun 15 16:57:58 PDT 2009


On Jun 15, 2009, at 4:33 PM, Dan Gohman wrote:

>> 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.

The part that confuses me is that code should generally know when it  
is working on a vector or not.  Is ConstantInt::get(4, <vector>)  
better than ConstantVector::get(4, <vector>) ?


>> 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.

Ok, but couldn't the API changes go in first?

-Chris



More information about the llvm-commits mailing list