[JumpThreading] Handle zero !prof branch_weights
authorYevgeny Rouban <yrouban@azul.com>
Fri, 12 Jun 2020 04:55:15 +0000 (11:55 +0700)
committerYevgeny Rouban <yrouban@azul.com>
Fri, 12 Jun 2020 04:55:15 +0000 (11:55 +0700)
commit707836ed4edb21e7133007f0200c3fd3a04d3409
tree6576fc5a39c70482a03b9f3a6b85b412c1884e7f
parent0ce9bf6eed4a630f2b2735a7226c2d5bf2c7c57a
[JumpThreading] Handle zero !prof branch_weights

Avoid division by zero in updatePredecessorProfileMetadata().

Reviewers: yamauchi
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D81499
llvm/lib/Transforms/Scalar/JumpThreading.cpp