Displaying 2 results from an estimated 2 matches for "e2c6d3e5".
2014 Sep 09
2
[LLVMdev] Canonicalization of ptrtoint/inttoptr and getelementptr
...do
> raw byte arithmetic.
>
I'm guessing the IR comes from C++ code that subtracts pointers, so it'd be
good if we could figure this out.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20140908/e2c6d3e5/attachment.html>
2014 Aug 31
3
[LLVMdev] Canonicalization of ptrtoint/inttoptr and getelementptr
Consider the two functions bellow:
define i8* @f(i8* %A) { %pti = ptrtoint i8* %A to i64 %add = add i64
%pti, 5 %itp = inttoptr i64 %add to i8* ret i8* %itp}
define i8* @g(i8* %A) {
%gep = getelementptr i8* %A, i64 5 ret i8* %gep}
What, if anything, prevents us from canonicalizing @f to @g?I've heard that
this might be in violation of
http://llvm.org/docs/LangRef.html#pointeraliasing