http://llvm.org/bugs/show_bug.cgi?id=5205

           Summary: extractvalue requires constants even for local arrays.
           Product: new-bugs
           Version: unspecified
          Platform: PC
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: new bugs
        AssignedTo: [email protected]
        ReportedBy: [email protected]
                CC: [email protected], [email protected],
                    [email protected]


If arrays (or arrays within structures) are considered first class, you should
be able to get at them in a general fashion.

Right now, you must use extractvalue with constant parameters, whereas it
should match getelementpointer in that if you're dealing with an array, you can
use variables.

If you have the equivalent of this code:

struct A { int x; ints[100] y; };
...
struct A mystruct;
int arbitrary = ...
mystruct.y[arbitrary] = mystruct.y[arbitrary] + 1

There's no clean way to do this in llvm. You either need to store the struct to
memory and then use gep on it, or you can use extractvalue and insertvalue but
only with constant indices.

Not so first classish.


-- 
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs

Reply via email to