[PATCH] add a function to translate subregister lane masks to other subregs.

Jakob Stoklund Olesen stoklund at 2pi.dk
Fri Aug 16 10:27:18 PDT 2013


On Aug 16, 2013, at 10:25 AM, Matthias Braun <mbraun at apple.com> wrote:

> 
> On Aug 16, 2013, at 10:08 AM, Jakob Stoklund Olesen <stoklund at 2pi.dk> wrote:
> 
>> 
>> On Aug 15, 2013, at 3:55 PM, Matthias Braun <mbraun at apple.com> wrote:
>> 
>>> Here’s the next part of my lane mask patches. This one adds a function to transform lane masks in a similar fashion like composeSubRegisterIndices does for sub registers.
>>> I’m putting this here for an early review. It probably does not make too much sense committing this now before more of the subreg alloc work is finished.
>> 
>> How big are the new tables?
> For one it’s only 1 sequence per sub register index, then in the backends I inspected manually (ARM, R600, X86) I never had more than 4 mask+rotate operations in a sequence with the majority being only 1 op.

Great, that’s much better than I had feared.

>> +        "    Result |= (Masked << Ops->RotateLeft) & 0xFFFFFFFF;\n"
>> +        "    Result |= (Masked >> (32 - Ops->RotateLeft));\n”
>> 
>> C unfortunately defines Masked >> 32 to be undefined behavior.
> Oh right, forgot the RotateLeft == 0 case, I will change it to "(32 - Ops->RotateLeft) & 0x1F" which is fine in this case.

Go ahead and commit with this change, if you like.

Thanks,
/jakob





More information about the llvm-commits mailing list