[LLVMdev] Type Legalizer Question.

Alireza.Moshtaghi at microchip.com Alireza.Moshtaghi at microchip.com
Thu Oct 2 10:21:03 PDT 2008

> > Won't work; LLVM expects at least some basic operations, like add,
> > be legal in legal register types.
> That sounds like a bug, not a feature.
> -Chris

I think the reason behind this behavior in llvm is the pointer
When it comes to expanding operands, llvm does not have any case defined
for load (because its only operand is a pointer) and it asserts if it
finds out that the pointer of store needs to be expanded...

For all other targets, whatever register is used for pointer, that
register can also be part of a legal operation of its own size. 
However, the problem with our target is that it allows only 8 bit
calculations but also provides 16 bit pointers (2 8 bits)


More information about the llvm-dev mailing list