OSDN Git Service

[InstSimplify] fold extracting from std::pair (2/2)
authorHiroshi Inoue <inouehrs@jp.ibm.com>
Fri, 3 Aug 2018 05:39:48 +0000 (05:39 +0000)
committerHiroshi Inoue <inouehrs@jp.ibm.com>
Fri, 3 Aug 2018 05:39:48 +0000 (05:39 +0000)
commitebab95406fef188d074f029bc07bbfc00192cff6
treee17f0a91952d77336a8cf584f9a1412daf325361
parent18e311ebbb75e564a6be5624076e4ae91af4e290
[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/trunk@338817 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Analysis/InstructionSimplify.cpp
test/Transforms/InstSimplify/AndOrXor.ll
test/Transforms/NewGVN/pair_jumpthread.ll