[LLVMdev] Switching between sibling/cousin registers via API calls

Jim Grosbach grosbach at apple.com
Tue Jul 17 15:50:55 PDT 2012


Hi Micah,

This sounds somewhat similar to what ARM uses for the stride-by-two vector load instructions. For example, Tuples2DSpc. While not exactly what you're looking for, perhaps something along those lines would work?

-Jim

On Jul 17, 2012, at 3:24 PM, "Villmow, Micah" <Micah.Villmow at amd.com> wrote:

> I have a register hierarchy that looks like a binary tree.
> v4 -> {v2, v2} -> {s, s}{s, s}(or, {x, y}, {z, w})
>  
> I have an instruction that can access the 2nd and/or 4th scalar and an
> instruction that can access the 1st and/or 3rd scalar. What I need to do
> is that given the first scalar, I need to be able to select the 2nd scalar,
> or/and given the 3rd, select the 4th. I define a sibling register as a register
> that has the same parent and a cousin as a register that has the same grandparent.
> So 'x' is a cousin of 'w' because of the grandparent class and 'x' is a sibling
> of 'y' because of the parent class.
>  
> I know I can move to parent/children registers via super/sub classes,
> but is there any way in LLVM currently to easily select a cousin/sibling registers that
> I am not seeing?
>  
> Currently what I've found to work is I do register - base_scalar_1 + base_scalar_2,
> but this doesn't seem like the best solution since this has an implicit
> assumption on the ordering of the enumerated register values.
>  
> Any ideas?
>  
> Thanks,
> Micah
>  
>  
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu         http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20120717/52bb85bb/attachment.html>


More information about the llvm-dev mailing list