[LLVMdev] getelementptr with dynamic index
Carl-Philip Hänsch
cphaensch at googlemail.com
Thu Sep 15 02:47:58 PDT 2011
Hi,
the following llvm-ir is manipulated by the optimizers:
%target2 = getelementptr %.string %result, i32 0, i32 3, i32 %len1
(%_.string = type {i32, i32, i32, [0 x i8]})
the last parameter i32 %len1 is replaced by i32 0 by the optimizers. (both,
2.9 and 2.8). When i turn optmization off, it works correctly.
How can i use an optimizer-safe dynamic indexing of arrays?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20110915/b1357e8f/attachment.html>
More information about the llvm-dev
mailing list