[llvm-commits] [llvm] r50985 - in /llvm/trunk: docs/ include/llvm/ include/llvm/Support/ lib/AsmParser/ lib/Bitcode/Reader/ lib/Bitcode/Writer/ lib/VMCore/

Chris Lattner clattner at apple.com
Mon May 12 13:24:40 PDT 2008


On May 12, 2008, at 1:01 PM, Dan Gohman wrote:
>> +<a href="#t_vector">vector</a> of <a href="#t_integer">integer</a>
>> result, of
>> +identical type as the values being compared.  The most significant
>> bit in each
>> +element is 1 if the element-wise comparison evaluates to true, and
>> is 0
>> +otherwise.  All other bits of the result are undefined.  The
>> condition codes
>> +are evaluated identically to the <a href="#i_icmp">'<tt>icmp</tt>'
>> +instruction</a>.
>
> It would be neat to overload the existing fcmp and icmp instead of
> introducing new instructions. But vicmp and vfcmp address a real
> need today without requiring the codegen to perform a bunch of magic
> on vectors of i1 to make this approach work well on current targets.
>
> Fortunately, nothing here rules out extending fcmp and icmp in the
> future :-).

Nate and I chatted about this, and decided the change would be really  
invasive.  The issue is that the vcmp instructions actually return a  
vector of integers, not a vector of i1.  This is pretty dissimilar to  
how icmp/fcmp works.

-Chris



More information about the llvm-commits mailing list