[llvm-commits] Fix for assertion in DAGCombiner

Dan Gohman gohman at apple.com
Thu Apr 29 10:41:08 PDT 2010


On Apr 28, 2010, at 3:00 PM, Jan Sjodin wrote:

> My expectation of doing a truncate of a vector of the same length, 
> but smaller element types is that each element is truncated to the 
> smaller size. This is what happens in the X86 backend today. 

Yes, this is what the operator means. Currently, LLVM generates
rather clumsy code to implement this operation though, as it hasn't
been tuned for this kind of code. I was curious if you had a code
sequence in mind that you were hoping to see the compiler emit.

Thinking about this a little more, I think this patch is fine, for
its part. However, the current one doesn't apply cleanly;
at a glance, it looks like the whitespace isn't quite correct.
Could you re-send it, possibly as an attachment?

>  A truncate of a vector of shorter length, but identical 
> element types could mean to reduce the size of the vector. I have not
> checked if this is the case.

It's not; the shufflevector operator is used for that purpose.

Dan




More information about the llvm-commits mailing list