aboutsummaryrefslogtreecommitdiff
path: root/lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp
diff options
context:
space:
mode:
authorSimon Pilgrim <llvm-dev@redking.me.uk>2021-07-22 10:58:31 +0100
committerSimon Pilgrim <llvm-dev@redking.me.uk>2021-07-22 10:58:51 +0100
commit1c9bec727ab5c53fa060560dc8d346a911142170 (patch)
treee5241ab069fc5f679585cbbfdd5784caea01df2e /lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp
parentdc1f6f8b92315fb90d9694df85ae2ce7a4a4f7e0 (diff)
downloadllvm-1c9bec727ab5c53fa060560dc8d346a911142170.zip
llvm-1c9bec727ab5c53fa060560dc8d346a911142170.tar.gz
llvm-1c9bec727ab5c53fa060560dc8d346a911142170.tar.bz2
[InstCombine] Fold (gep (oneuse(gep Ptr, Idx0)), Idx1) -> (gep Ptr, (add Idx0, Idx1)) (PR51069)
As noticed on D106352, after we've folded "(select C, (gep Ptr, Idx), Ptr) -> (gep Ptr, (select C, Idx, 0))" if the inner Ptr was also a (now one use) gep we could then merge the geps, using the sum of the indices instead. I've limited this to basic 2-op geps - a more general case further down InstCombinerImpl.visitGetElementPtrInst doesn't have the one-use limitation but only creates the add if it can be created via SimplifyAddInst. https://alive2.llvm.org/ce/z/f8pLfD (Thanks Roman!) Differential Revision: https://reviews.llvm.org/D106450
Diffstat (limited to 'lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp')
0 files changed, 0 insertions, 0 deletions