summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms
diff options
context:
space:
mode:
authorSanjay Patel <spatel@rotateright.com>2016-04-11 17:27:44 +0000
committerSanjay Patel <spatel@rotateright.com>2016-04-11 17:27:44 +0000
commit3a48e9823e4e806ee6c08c42a1e93dd52e8cb6f7 (patch)
treeaa069edcd6136fafc491a588b10842e6380cefba /llvm/lib/Transforms
parent4b9c682acfcb4987d913764741725d55b5317fd6 (diff)
downloadbcm5719-llvm-3a48e9823e4e806ee6c08c42a1e93dd52e8cb6f7.tar.gz
bcm5719-llvm-3a48e9823e4e806ee6c08c42a1e93dd52e8cb6f7.zip
add an assert for safety; NFC
llvm-svn: 265969
Diffstat (limited to 'llvm/lib/Transforms')
-rw-r--r--llvm/lib/Transforms/InstCombine/InstCombineShifts.cpp2
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)
OpenPOWER on IntegriCloud