[LLVMdev] Will GetElementPtr work as expected
Kanika Gupta
kanikagupta0906 at gmail.com
Tue Oct 29 23:54:51 PDT 2013
Hi,
I am writing llvm code using C++. I have a place in my code where the below
scenario happens
1. %117 = phi <2 x double>* [ %105, %aligned ], [ %159, %116 ]
2. %123 = getelementptr <2 x double>* %117, i32 0
3. %127 = getelementptr <2 x double>* %123, i32 0
4. %128 = load <2 x double>* %127
5. %129 = getelementptr <2 x double>* %123, i32 1
6. %130 = load <2 x double>* %129
7. %131 = shufflevector <2 x double> %128, <2 x double> %130, <2 x
i32> <i32 1, i32 3>
I am trying to compute the same address which should point to same data
type twice in lines 7 and 8 with the address parameter value different. Is
it safe to do this or will this lead to undefined results?
--
Kanika.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20131030/e25d40c3/attachment.html>
More information about the llvm-dev
mailing list