[llvm-dev] ptrtoint > addrspacecast is disallowed

Kavindu Gimhan Zoysa via llvm-dev llvm-dev at lists.llvm.org
Fri Jul 30 00:19:45 PDT 2021


Hi all,

*ptrtoint (i8* addrspacecast (i8 addrspace(1)* inttoptr (i64
3098316506530080114 to i8 addrspace(1)*) to i8*) to i64)*

As shown here
<https://github.com/llvm/llvm-project/blob/main/llvm/lib/IR/Instructions.cpp#L2797>,
ptrtoint -> addrspacecast is disallowed in *instcombine* pass. Can you
please explain to me the reason behind this?

If I run the *instcombine* pass against the above instructions, nothing
happens. But if I remove it, the code got optimized.

Thank you,
Kavindu

Kavindu Gimhan Zoysa,
BSc(Hons) | ENTC | UoM,
ATL | WSO2

GitHub <https://github.com/KavinduZoysa> LinkedIn
<https://www.linkedin.com/in/kavindu-gimhan-zoysa-85939a122/> Medium
<https://medium.com/@kavindugimhanzoysa>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20210730/594ff467/attachment.html>


More information about the llvm-dev mailing list