OSDN Git Service

[JumpThreading] Unfold selects that depend on the same condition
authorPablo Barrio <pablo.barrio@arm.com>
Tue, 8 Nov 2016 14:53:30 +0000 (14:53 +0000)
committerPablo Barrio <pablo.barrio@arm.com>
Tue, 8 Nov 2016 14:53:30 +0000 (14:53 +0000)
commitac54d0066c478a09c7cd28d15d0f9ff8af984afc
tree3349cd33d1c57ccb3a7ede364976353131f9a9f2
parent169b408a54ea50527468719e3f8cda598bc6a4a2
[JumpThreading] Unfold selects that depend on the same condition

Summary:
These are good candidates for jump threading. This enables later opts
(such as InstCombine) to combine instructions from the selects with
instructions out of the selects. SimplifyCFG will fold the select
again if unfolding wasn't worth it.

Patch by James Molloy and Pablo Barrio.

Reviewers: rengolin, haicheng, sebpop

Subscribers: jojo, jmolloy, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@286236 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/Transforms/Scalar/JumpThreading.h
lib/Transforms/Scalar/JumpThreading.cpp
test/Transforms/JumpThreading/unfold-selects-same-cond.ll [new file with mode: 0644]