summaryrefslogtreecommitdiffstats
path: root/llvm/lib/IR
diff options
context:
space:
mode:
authorYevgeny Rouban <yevgeny.rouban@azul.com>2019-07-09 05:07:28 +0000
committerYevgeny Rouban <yevgeny.rouban@azul.com>2019-07-09 05:07:28 +0000
commit592f44a7e75b9cd3efc5bed0117d5dcc47c030c3 (patch)
tree3ba4956976dafa0e4c84689346f0287d961b586f /llvm/lib/IR
parent048493f882faf19d80a1343d877d69cbb19c5091 (diff)
downloadbcm5719-llvm-592f44a7e75b9cd3efc5bed0117d5dcc47c030c3.tar.gz
bcm5719-llvm-592f44a7e75b9cd3efc5bed0117d5dcc47c030c3.zip
Prepare for making SwitchInstProfUpdateWrapper strict
This patch removes the test part that relates to the non-strict behavior of SwitchInstProfUpdateWrapper and changes the assertion to llvm_unreachable() to allow the check in release builds. This patch prepares SwitchInstProfUpdateWrapper to become strict with one line change. That is need to revert it easily if any failure will arise. llvm-svn: 365439
Diffstat (limited to 'llvm/lib/IR')
-rw-r--r--llvm/lib/IR/Instructions.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/llvm/lib/IR/Instructions.cpp b/llvm/lib/IR/Instructions.cpp
index 693918c8c07..2e7cad103c1 100644
--- a/llvm/lib/IR/Instructions.cpp
+++ b/llvm/lib/IR/Instructions.cpp
@@ -3913,9 +3913,8 @@ void SwitchInstProfUpdateWrapper::init() {
if (ProfileData->getNumOperands() != SI.getNumSuccessors() + 1) {
State = Invalid;
if (SwitchInstProfUpdateWrapperStrict)
- assert(false &&
- "number of prof branch_weights metadata operands corresponds to"
- " number of succesors");
+ llvm_unreachable("number of prof branch_weights metadata operands does "
+ "not correspond to number of succesors");
return;
}
OpenPOWER on IntegriCloud