1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-24 19:52:54 +01:00

add an assert for safety; NFC

llvm-svn: 265969
This commit is contained in:
Sanjay Patel 2016-04-11 17:27:44 +00:00
parent 3172549776
commit 86526c47b6

View File

@ -61,6 +61,8 @@ static bool canEvaluateShiftedShift(unsigned FirstShiftAmt,
bool IsFirstShiftLeft, bool IsFirstShiftLeft,
Instruction *SecondShift, InstCombiner &IC, Instruction *SecondShift, InstCombiner &IC,
Instruction *CxtI) { Instruction *CxtI) {
assert(SecondShift->isLogicalShift() && "Unexpected instruction type");
// We need constant shifts. // We need constant shifts.
auto *SecondShiftConst = dyn_cast<ConstantInt>(SecondShift->getOperand(1)); auto *SecondShiftConst = dyn_cast<ConstantInt>(SecondShift->getOperand(1));
if (!SecondShiftConst) if (!SecondShiftConst)