commit | 769ea2f93fa7fdd73f8388e863cf4dc9689d2e38 | [log] [tgz] |
---|---|---|
author | Manman Ren <mren@apple.com> | Tue May 01 17:16:15 2012 +0000 |
committer | Manman Ren <mren@apple.com> | Tue May 01 17:16:15 2012 +0000 |
tree | a26f03e58df98343d7a91ec65aebad9d8dc5f8c3 | |
parent | d07d06ceef942c478c0f75a4c4d7442e61ddff1d [diff] |
X86: optimization for max-like struct This patch will optimize the following cases on X86 (a > b) ? (a-b) : 0 (a >= b) ? (a-b) : 0 (b < a) ? (a-b) : 0 (b <= a) ? (a-b) : 0 FROM movl %edi, %ecx subl %esi, %ecx cmpl %edi, %esi movl $0, %eax cmovll %ecx, %eax TO xorl %eax, %eax subl %esi, %edi cmovll %eax, %edi movl %edi, %eax rdar: 10734411 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@155919 91177308-0d34-0410-b5e6-96231b3b80d8