[llvm-commits] [llvm] r127116 - in /llvm/trunk: include/llvm/Constants.h lib/Transforms/InstCombine/InstCombineCompares.cpp lib/VMCore/Constants.cpp test/Transforms/InstCombine/icmp.ll

Nick Lewycky nicholas at mxc.ca
Sun Mar 6 15:18:48 PST 2011


On 03/06/2011 05:53 AM, Duncan Sands wrote:
> Hi Nick,
>
>> ConstantInt has some getters which return ConstantInt's or ConstantVector's of
>> the value splatted into every element. Extend this to getTrue and getFalse which
>> by providing new overloads that take Types that are either i1 or<N x i1>. Use
>> it in InstCombine to add vector support to some code, fixing PR8469!
>
> the code generators do not support vectors of i1, so if your patch is creating
> them (and they didn't exist already) then that part needs to be disabled.

The <N x i1> icmp instruction was already there, then opt -instcombine 
was crashing trying to remove it in favour of a constant.

Also, the bug was filed by AMD who have their own backend targeting 
AMDIL, so they probably already have to support <N x i1> anyways. Adding 
support for them in the other backends would be great though!

Nick



More information about the llvm-commits mailing list