[LLVMbugs] [Bug 5205] extractvalue requires constant indices even for local arrays.

bugzilla-daemon at cs.uiuc.edu bugzilla-daemon at cs.uiuc.edu
Thu Oct 15 18:18:44 PDT 2009


Dan Gohman <gohman at apple.com> changed:

           What    |Removed                     |Added
             Status|NEW                         |RESOLVED
         Resolution|                            |INVALID

--- Comment #2 from Dan Gohman <gohman at apple.com>  2009-10-15 20:18:43 ---
Yes. The proper way to implement the code in the given example is to leave the
structs/arrays in "memory", use getelementptr to compute addresses of elements,
and load and store to read and write to the elements. For example,

  %p = getelementptr mystruct, 0, 1, %arbitrary
  %t = load int* %p
  %s = add %t, 1
  store int %s, int* %p

First-class struct/array types aren't intended to be a replacement or
alternative to this idiom.

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.

More information about the llvm-bugs mailing list