aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/ExecutionEngine/Orc/ExecutorProcessControl.cpp
diff options
context:
space:
mode:
authorKrishna Kariya <krishna17060@iiitd.ac.in>2021-07-18 23:13:25 +0200
committerNikita Popov <nikita.ppv@gmail.com>2021-07-18 23:13:25 +0200
commitda92e86263c3dcbe0d19fe68d1be2373b74eedf5 (patch)
tree9045d5ecdb06a36ad69f2c2129d442ba7fc2e397 /llvm/lib/ExecutionEngine/Orc/ExecutorProcessControl.cpp
parent2b17c24a03037cb3870b849d0c64f1958308d83d (diff)
downloadllvm-da92e86263c3dcbe0d19fe68d1be2373b74eedf5.zip
llvm-da92e86263c3dcbe0d19fe68d1be2373b74eedf5.tar.gz
llvm-da92e86263c3dcbe0d19fe68d1be2373b74eedf5.tar.bz2
[InstCombine] Fold IntToPtr/PtrToInt to bitcast
The inttoptr/ptrtoint roundtrip optimization is not always correct. We are working towards removing this optimization and adding support to specific cases where this optimization works. This patch is the first one on this line. Consider the example: %i = ptrtoint i8* %X to i64 %p = inttoptr i64 %i to i16* %cmp = icmp eq i8* %load, %p In this specific case, the inttoptr/ptrtoint optimization is correct as it only compares the pointer values. In this patch, we fold inttoptr/ptrtoint to a bitcast (if src and dest types are different). Differential Revision: https://reviews.llvm.org/D105088
Diffstat (limited to 'llvm/lib/ExecutionEngine/Orc/ExecutorProcessControl.cpp')
0 files changed, 0 insertions, 0 deletions