[LLVMdev] Extending vector operations

Chris Lattner clattner at apple.com
Mon Jul 21 23:19:44 PDT 2008


On Jul 21, 2008, at 4:46 PM, Nate Begeman wrote:

>
> I totally disagree with this approach; A vector of i1 doesn't  
> actually match what you want to do with the hardware, unless you had  
> say, 128 x i1 for SSE, and it's strange when you have to spill and  
> reload it.  The current VICMP and VFCMP instructions do not exist  
> for use with machine intrinsics; they exist to allow code written  
> use C-style comparison operators to generate efficient code on a  
> wide range of both scalar and vector hardware.

One interesting point here is that clang follows the same semantics  
that LLVM IR does for comparisons.  This means you can use "V1 < V2"  
and the result is defined to be a vector of integers the same width  
with only the sign bits defined.

-Chris



More information about the llvm-dev mailing list