commit | ee25f1e872ae3073e8303b218e6c1253bda267c1 | [log] [tgz] |
---|---|---|
author | Hans Wennborg <hans@hanshq.net> | Thu May 07 15:47:15 2015 +0000 |
committer | Hans Wennborg <hans@hanshq.net> | Thu May 07 15:47:15 2015 +0000 |
tree | 94fd76e8b73cc2d4c0ac124799e0483a7d0fb06b | |
parent | bd58bdb7a61afeadd7c71d4b5351695a43d17d44 [diff] |
Switch lowering: handle zero-weight branch probabilities After r236617, branch probabilities are no longer guaranteed to be >= 1. This patch makes the swich lowering code handle that correctly, without bumping the branch weights by 1 which might cause overflow and skews the probabilities. Covered by @zero_weight_tree in test/CodeGen/X86/switch.ll. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@236739 91177308-0d34-0410-b5e6-96231b3b80d8