[LLVMdev] Unsigned CCCondCode Legalization

Matt Arsenault arsenm2 at gmail.com
Mon Dec 1 07:55:40 PST 2014


> On Dec 1, 2014, at 5:46 AM, Johnny Val <johnnydval at gmail.com> wrote:
> 
> To convert from an unsigned integer operation to a singed one whilst
> still keeping the same result, zero extending to iN + 1 and removing
> the unsigned flag from the CCCode should be enough (as far as I can
> tell).

This won’t work. You would always need to have a wider, legal integer type available. Since condition codes are legalized after type legalization, you must expand them in terms of operations on legal types

-Matt



More information about the llvm-dev mailing list