[llvm] r265969 - add an assert for safety; NFC
Sanjay Patel via llvm-commits
llvm-commits at lists.llvm.org
Mon Apr 11 10:27:45 PDT 2016
Author: spatel
Date: Mon Apr 11 12:27:44 2016
New Revision: 265969
URL: http://llvm.org/viewvc/llvm-project?rev=265969&view=rev
Log:
add an assert for safety; 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=265969&r1=265968&r2=265969&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/InstCombine/InstCombineShifts.cpp (original)
+++ llvm/trunk/lib/Transforms/InstCombine/InstCombineShifts.cpp Mon Apr 11 12:27:44 2016
@@ -61,6 +61,8 @@ static bool canEvaluateShiftedShift(unsi
bool IsFirstShiftLeft,
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)
More information about the llvm-commits
mailing list