summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/InstCombine/InstCombineInternal.h
diff options
context:
space:
mode:
authorCraig Topper <craig.topper@gmail.com>2017-04-12 18:05:21 +0000
committerCraig Topper <craig.topper@gmail.com>2017-04-12 18:05:21 +0000
commitb0076fe8b4cb821faf766f7fc1c442e5f294ebdc (patch)
tree2fc7858e72bea348cb1dad9b642fa9dce65324f9 /llvm/lib/Transforms/InstCombine/InstCombineInternal.h
parentaf3bc2089e8ebd4a9c62a651579c6770b05af55c (diff)
downloadbcm5719-llvm-b0076fe8b4cb821faf766f7fc1c442e5f294ebdc.tar.gz
bcm5719-llvm-b0076fe8b4cb821faf766f7fc1c442e5f294ebdc.zip
[InstCombine] Move portion of SimplifyDemandedUseBits that deals with instructions with multiple uses out to a separate method. NFCI
llvm-svn: 300082
Diffstat (limited to 'llvm/lib/Transforms/InstCombine/InstCombineInternal.h')
-rw-r--r--llvm/lib/Transforms/InstCombine/InstCombineInternal.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/llvm/lib/Transforms/InstCombine/InstCombineInternal.h b/llvm/lib/Transforms/InstCombine/InstCombineInternal.h
index ab15fd84b24..f163f57f54b 100644
--- a/llvm/lib/Transforms/InstCombine/InstCombineInternal.h
+++ b/llvm/lib/Transforms/InstCombine/InstCombineInternal.h
@@ -542,6 +542,13 @@ private:
bool SimplifyDemandedBits(Instruction *I, unsigned Op,
const APInt &DemandedMask, APInt &KnownZero,
APInt &KnownOne, unsigned Depth = 0);
+ /// Helper routine of SimplifyDemandedUseBits. It computes KnownZero/KnownOne
+ /// bits. It also tries to handle simplifications that can be done based on
+ /// DemandedMask, but without modifying the Instruction.
+ Value *SimplifyMultipleUseDemandedBits(Instruction *I,
+ const APInt &DemandedMask,
+ APInt &KnownZero, APInt &KnownOne,
+ unsigned Depth, Instruction *CxtI);
/// Helper routine of SimplifyDemandedUseBits. It tries to simplify demanded
/// bit for "r1 = shr x, c1; r2 = shl r1, c2" instruction sequence.
Value *SimplifyShrShlDemandedBits(Instruction *Lsr, Instruction *Sftl,
OpenPOWER on IntegriCloud