aboutsummaryrefslogtreecommitdiff
path: root/test/Transforms/SimplifyCFG/switch-to-icmp.ll
AgeCommit message (Collapse)Author
2013-04-16simplifycfg: Fix integer overflow converting switch into icmp.Hans Wennborg
If a switch instruction has a case for every possible value of its type, with the same successor, SimplifyCFG would replace it with an icmp ult, but the computation of the bound overflows in that case, which inverts the test. Patch by Jed Davis! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179587 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-07SimplifyCFG: Track the number of used icmps when turning a icmp chain into a ↵Benjamin Kramer
switch. If we used only one icmp, don't turn it into a switch. Also prevent the switch-to-icmp transform from creating identity adds, noticed by Marius Wachtler. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@125056 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-03SimplifyCFG: Also transform switches that represent a range comparison but ↵Benjamin Kramer
are not sorted into sub+icmp. This transforms another 1000 switches in gcc.c. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124826 91177308-0d34-0410-b5e6-96231b3b80d8