commit | 56442dfdcf7b07c04b585de5205b9427b1739895 | [log] [tgz] |
---|---|---|
author | Benjamin Kramer <benny.kra@googlemail.com> | Wed Feb 02 15:56:22 2011 +0000 |
committer | Benjamin Kramer <benny.kra@googlemail.com> | Wed Feb 02 15:56:22 2011 +0000 |
tree | 93e69afd94be2799ef289cd14f0f02e73e5fb05b | |
parent | ff0c5014b2127b16815121d9e723dc85bd164a79 [diff] |
SimplifyCFG: Turn switches into sub+icmp+branch if possible. This makes the job of the later optzn passes easier, allowing the vast amount of icmp transforms to chew on it. We transform 840 switches in gcc.c, leading to a 16k byte shrink of the resulting binary on i386-linux. The testcase from README.txt now compiles into decl %edi cmpl $3, %edi sbbl %eax, %eax andl $1, %eax ret git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124724 91177308-0d34-0410-b5e6-96231b3b80d8