Skip to content
Commit 44faaa7a authored by Hans Wennborg's avatar Hans Wennborg
Browse files

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.

llvm-svn: 236739
parent 04d9e653
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment