diff options
author | Serge Pavlov <sepavloff@gmail.com> | 2014-05-11 08:46:12 +0000 |
---|---|---|
committer | Serge Pavlov <sepavloff@gmail.com> | 2014-05-11 08:46:12 +0000 |
commit | 86118b4532f0790fe7168fcf00e61a09fa2e5362 (patch) | |
tree | 246c01308e3e871a15cf1821ef239a5256faad67 /lib/Transforms/InstCombine/InstCombine.h | |
parent | 4ccf0ebb19ffcd22ee730d3c90112dea31d619f4 (diff) | |
download | llvm-86118b4532f0790fe7168fcf00e61a09fa2e5362.tar.gz llvm-86118b4532f0790fe7168fcf00e61a09fa2e5362.tar.bz2 llvm-86118b4532f0790fe7168fcf00e61a09fa2e5362.tar.xz |
Reorder shuffle and binary operation.
This patch enables transformations:
BinOp(shuffle(v1), shuffle(v2)) -> shuffle(BinOp(v1, v2))
BinOp(shuffle(v1), const1) -> shuffle(BinOp, const2)
They allow to eliminate extra shuffles in some cases.
Differential Revision: http://reviews.llvm.org/D3525
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@208488 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms/InstCombine/InstCombine.h')
-rw-r--r-- | lib/Transforms/InstCombine/InstCombine.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/Transforms/InstCombine/InstCombine.h b/lib/Transforms/InstCombine/InstCombine.h index 4a5517a6d3..0fbc7a4619 100644 --- a/lib/Transforms/InstCombine/InstCombine.h +++ b/lib/Transforms/InstCombine/InstCombine.h @@ -358,6 +358,8 @@ private: Value *SimplifyDemandedVectorElts(Value *V, APInt DemandedElts, APInt &UndefElts, unsigned Depth = 0); + Value *SimplifyVectorOp(BinaryOperator &Inst); + // FoldOpIntoPhi - Given a binary operator, cast instruction, or select // which has a PHI node as operand #0, see if we can fold the instruction // into the PHI (which is only possible if all operands to the PHI are |