OSDN Git Service

Merging r338817:
authorHans Wennborg <hans@hanshq.net>
Tue, 7 Aug 2018 06:20:40 +0000 (06:20 +0000)
committerHans Wennborg <hans@hanshq.net>
Tue, 7 Aug 2018 06:20:40 +0000 (06:20 +0000)
commit1a7200c98d569939f0121a734c8eee7bc10558c3
tree87baeb3af6039bf7536f0a50be8e5e2f6642ebcf
parent491b046539835aa270d5a61254b5a539eac0db51
Merging r338817:
------------------------------------------------------------------------
r338817 | inouehrs | 2018-08-03 07:39:48 +0200 (Fri, 03 Aug 2018) | 10 lines

[InstSimplify] fold extracting from std::pair (2/2)

This is the second patch of the series which intends to enable jump threading for an inlined method whose return type is std::pair<int, bool> or std::pair<bool, int>.
The first patch is https://reviews.llvm.org/rL338485.

This patch handles code sequences that merges two values using `shl` and `or`, then extracts one value using `and`.

Differential Revision: https://reviews.llvm.org/D49981

------------------------------------------------------------------------

git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_70@339097 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Analysis/InstructionSimplify.cpp
test/Transforms/InstSimplify/AndOrXor.ll
test/Transforms/NewGVN/pair_jumpthread.ll