[llvm] r265970 - add FIXME comment; NFC
Sanjay Patel via llvm-commits
llvm-commits at lists.llvm.org
Mon Apr 11 10:35:57 PDT 2016
Author: spatel
Date: Mon Apr 11 12:35:57 2016
New Revision: 265970
URL: http://llvm.org/viewvc/llvm-project?rev=265970&view=rev
Log:
add FIXME comment; NFC
Modified:
llvm/trunk/lib/Transforms/InstCombine/InstCombineShifts.cpp
Modified: llvm/trunk/lib/Transforms/InstCombine/InstCombineShifts.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/InstCombine/InstCombineShifts.cpp?rev=265970&r1=265969&r2=265970&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/InstCombine/InstCombineShifts.cpp (original)
+++ llvm/trunk/lib/Transforms/InstCombine/InstCombineShifts.cpp Mon Apr 11 12:35:57 2016
@@ -62,7 +62,7 @@ static bool canEvaluateShiftedShift(unsi
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,
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();
More information about the llvm-commits
mailing list