diff options
| author | Sanjay Patel <spatel@rotateright.com> | 2016-04-11 17:27:44 +0000 |
|---|---|---|
| committer | Sanjay Patel <spatel@rotateright.com> | 2016-04-11 17:27:44 +0000 |
| commit | 3a48e9823e4e806ee6c08c42a1e93dd52e8cb6f7 (patch) | |
| tree | aa069edcd6136fafc491a588b10842e6380cefba /llvm/lib | |
| parent | 4b9c682acfcb4987d913764741725d55b5317fd6 (diff) | |
| download | bcm5719-llvm-3a48e9823e4e806ee6c08c42a1e93dd52e8cb6f7.tar.gz bcm5719-llvm-3a48e9823e4e806ee6c08c42a1e93dd52e8cb6f7.zip | |
add an assert for safety; NFC
llvm-svn: 265969
Diffstat (limited to 'llvm/lib')
| -rw-r--r-- | llvm/lib/Transforms/InstCombine/InstCombineShifts.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
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<ConstantInt>(SecondShift->getOperand(1)); if (!SecondShiftConst) |

