From 3a48e9823e4e806ee6c08c42a1e93dd52e8cb6f7 Mon Sep 17 00:00:00 2001 From: Sanjay Patel Date: Mon, 11 Apr 2016 17:27:44 +0000 Subject: add an assert for safety; NFC llvm-svn: 265969 --- llvm/lib/Transforms/InstCombine/InstCombineShifts.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'llvm/lib/Transforms/InstCombine') diff --git a/llvm/lib/Transforms/InstCombine/InstCombineShifts.cpp b/llvm/lib/Transforms/InstCombine/InstCombineShifts.cpp index 9cd408428ad..4a563b4eb75 100644 --- a/llvm/lib/Transforms/InstCombine/InstCombineShifts.cpp +++ b/llvm/lib/Transforms/InstCombine/InstCombineShifts.cpp @@ -61,6 +61,8 @@ static bool canEvaluateShiftedShift(unsigned FirstShiftAmt, bool IsFirstShiftLeft, Instruction *SecondShift, InstCombiner &IC, Instruction *CxtI) { + assert(SecondShift->isLogicalShift() && "Unexpected instruction type"); + // We need constant shifts. auto *SecondShiftConst = dyn_cast(SecondShift->getOperand(1)); if (!SecondShiftConst) -- cgit v1.2.3