[PATCH] Fix v*i1 store size

Nadav Rotem nrotem at apple.com
Tue Jan 29 14:56:09 PST 2013


Hi Hal, 

I am not sure that this is the right approach. The type '<Y x i1>' may be legal (it is legal on Intel's MIC, and possibly other targets) and in these targets the mask can be saved into memory in the packed form. 

As you know at the moment we can't save <Y x i1> to memory. I think that the right way to handle this is to always pack and unpack the bits when reading/writing memory.  So, v4i1 would take 1 byte (mask in the lowest 4 bits). 

Thanks,
Nadav



On Jan 29, 2013, at 2:06 PM, Hal Finkel <hfinkel at anl.gov> wrote:

> Hello,
> 
> Please review the attached patch which fixes the storage size (in bytes) reported by DataLayout and MVT/EVT for v*i1 vectors. The current (incorrect) behavior is to round the total size in bits up and divide by 8. Instead, each element is stored in a separate byte, and so the result should be equal to the number of elements in the vector.
> 
> Thanks again,
> Hal
> 
> -- 
> Hal Finkel
> Postdoctoral Appointee
> Leadership Computing Facility
> Argonne National Laboratory
> <i1vstoresize.patch>_______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits




More information about the llvm-commits mailing list