<div dir="ltr">Consider the two functions bellow:<div><br>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}<br>define i8* @g(i8* %A) {<br> %gep = getelementptr i8* %A, i64 5 ret i8* %gep}<br>
What, if anything, prevents us from canonicalizing @f to @g?I've heard that this might be in violation of <a href="http://llvm.org/docs/LangRef.html#pointeraliasing">http://llvm.org/docs/LangRef.html#pointeraliasing</a> but I don't see how.</div>
</div>