[llvm-commits] [llvm] r74768 - in /llvm/trunk/lib/Target/PIC16: PIC16ISelLowering.cpp PIC16InstrInfo.td

Duncan Sands baldrick at free.fr
Fri Jul 3 01:05:11 PDT 2009


Hi Sanjiv,

> For extended loads of type i1 to i8, we will need to at least one byte from memory.
> The change in the .td file is to mark the side effects of mov insn.

...

>      unsigned MemBytes = MemVT.getSizeInBits() / 8;
> +    // if MVT::i1 is extended to MVT::i8 then MemBytes will be zero
> +    // So set it to one
> +    if (MemBytes == 0) MemBytes = 1;

you should use
   unsigned MemBytes = MemVT.getStoreSizeInBits() / 8;
instead.  The store size is the number of bits in memory
that is touched by storing (or loading) this type, and is
8 for i1.

Ciao,

Duncan.



More information about the llvm-commits mailing list