[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 17:35:53 PDT 2009


On Jun 15, 2009, at 5:22 PM, Dan Gohman wrote:

>>
>> 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>) ?
>
> There are lots of places where vector/scalar-independent code
> is useful. As one example, the instcombine code that converts
>
>   %b = trunc i64 %a to i32
>   %c = zext i32 %b to i64
> to
>   %c = and i64, 4294967295
>
> now performs the same optimization for vectors, as a result
> of this commit.

Ok then.  Please make it really clear in the doxygen documentation for  
these methods that this is allowed, thanks Dan!

-Chris



More information about the llvm-commits mailing list