diff options
author | Sanjay Patel <spatel@rotateright.com> | 2016-04-11 17:35:57 +0000 |
---|---|---|
committer | Sanjay Patel <spatel@rotateright.com> | 2016-04-11 17:35:57 +0000 |
commit | b91bcd704a72081e4af799fccee351724f15a79a (patch) | |
tree | 81d43bd604d989072b1e47f3317bd7db51c44a26 /llvm/lib/Transforms | |
parent | 3a48e9823e4e806ee6c08c42a1e93dd52e8cb6f7 (diff) | |
download | bcm5719-llvm-b91bcd704a72081e4af799fccee351724f15a79a.tar.gz bcm5719-llvm-b91bcd704a72081e4af799fccee351724f15a79a.zip |
add FIXME comment; NFC
llvm-svn: 265970
Diffstat (limited to 'llvm/lib/Transforms')
-rw-r--r-- | llvm/lib/Transforms/InstCombine/InstCombineShifts.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/llvm/lib/Transforms/InstCombine/InstCombineShifts.cpp b/llvm/lib/Transforms/InstCombine/InstCombineShifts.cpp index 4a563b4eb75..08e16a7ee1a 100644 --- a/llvm/lib/Transforms/InstCombine/InstCombineShifts.cpp +++ b/llvm/lib/Transforms/InstCombine/InstCombineShifts.cpp @@ -62,7 +62,7 @@ static bool canEvaluateShiftedShift(unsigned FirstShiftAmt, Instruction *SecondShift, InstCombiner &IC, Instruction *CxtI) { assert(SecondShift->isLogicalShift() && "Unexpected instruction type"); - + // We need constant shifts. auto *SecondShiftConst = dyn_cast<ConstantInt>(SecondShift->getOperand(1)); if (!SecondShiftConst) @@ -256,6 +256,8 @@ static Value *GetShiftedValue(Value *V, unsigned NumBits, bool isLeftShift, BO->setHasNoSignedWrap(false); return BO; } + // FIXME: This is almost identical to the SHL case. Refactor both cases into + // a helper function. case Instruction::LShr: { BinaryOperator *BO = cast<BinaryOperator>(I); unsigned TypeWidth = BO->getType()->getScalarSizeInBits(); |