[LLVMdev] Does current LLVM target-independent code generator supports my strange chip?

Duncan Sands baldrick at free.fr
Wed Nov 26 01:07:41 PST 2008


On Wednesday 26 November 2008 09:31:26 Wei wrote:
> O...k... I try to make some conclusions:
> 
> 1) The conversion from f32 to f24 or i32 to i24 should be written in
> the backend.

I disagree.  This should be handled by the type legalization
infrastructure.  After all, that's what it is for!  However
there is currently no support for anything like f32 -> f24.
On the other hand, as I mentioned in another email, I think
i32 -> i24 can be done generically.

> 2) If we use MVT::getIntegerVT() to get i24 LLVM type, then the
> problem will be:
>   > target independent codegen's legalizer can not handle this.
> Because the type legalizer currently assumes that all legal integer
> types have a power-of-two number of bits.

If i24 is added as a simple value type, then the type legalizer
can be generalized to handle this without too much difficulty.

Ciao,

Duncan.



More information about the llvm-dev mailing list