summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/InstCombine/InstCombineInternal.h
diff options
context:
space:
mode:
authorJames Molloy <james.molloy@arm.com>2015-12-11 10:04:51 +0000
committerJames Molloy <james.molloy@arm.com>2015-12-11 10:04:51 +0000
commit37b82e79b20f7f8798d2b51508d5923703204351 (patch)
treecc9ed2413002adf3c29f49032eb7a8f9a11536b3 /llvm/lib/Transforms/InstCombine/InstCombineInternal.h
parent48651489b3e885c21a0119a9e06f5355303dfd66 (diff)
downloadbcm5719-llvm-37b82e79b20f7f8798d2b51508d5923703204351.tar.gz
bcm5719-llvm-37b82e79b20f7f8798d2b51508d5923703204351.zip
[InstCombine] Make MatchBSwap also match bit reversals
MatchBSwap has most of the functionality to match bit reversals already. If we switch it from looking at bytes to individual bits and remove a few early exits, we can extend the main recursive function to match any sequence of ORs, ANDs and shifts that assemble a value from different parts of another, base value. Once we have this bit->bit mapping, we can very simply detect if it is appropriate for a bswap or bitreverse. llvm-svn: 255334
Diffstat (limited to 'llvm/lib/Transforms/InstCombine/InstCombineInternal.h')
-rw-r--r--llvm/lib/Transforms/InstCombine/InstCombineInternal.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Transforms/InstCombine/InstCombineInternal.h b/llvm/lib/Transforms/InstCombine/InstCombineInternal.h
index 1bb3ad6c534..534f6700815 100644
--- a/llvm/lib/Transforms/InstCombine/InstCombineInternal.h
+++ b/llvm/lib/Transforms/InstCombine/InstCombineInternal.h
@@ -556,7 +556,7 @@ private:
Value *InsertRangeTest(Value *V, Constant *Lo, Constant *Hi, bool isSigned,
bool Inside);
Instruction *PromoteCastOfAllocation(BitCastInst &CI, AllocaInst &AI);
- Instruction *MatchBSwap(BinaryOperator &I);
+ Instruction *MatchBSwapOrBitReverse(BinaryOperator &I);
bool SimplifyStoreAtEndOfBlock(StoreInst &SI);
Instruction *SimplifyMemTransfer(MemIntrinsic *MI);
Instruction *SimplifyMemSet(MemSetInst *MI);
OpenPOWER on IntegriCloud