diff options
author | Evan Cheng <evan.cheng@apple.com> | 2012-01-04 01:41:39 +0000 |
---|---|---|
committer | Evan Cheng <evan.cheng@apple.com> | 2012-01-04 01:41:39 +0000 |
commit | 56f582d664c54bf4567ec37d0bd16b6d4ea6a6eb (patch) | |
tree | 885c9db256151200548df5cee4b3dfb938079b5a /lib/Target/ARM/ARMFrameLowering.cpp | |
parent | 091523c6487fea71571a42f5d74eaf439f133f8c (diff) |
For x86, canonicalize max
(x > y) ? x : y
=>
(x >= y) ? x : y
So for something like
(x - y) > 0 : (x - y) ? 0
It will be
(x - y) >= 0 : (x - y) ? 0
This makes is possible to test sign-bit and eliminate a comparison against
zero. e.g.
subl %esi, %edi
testl %edi, %edi
movl $0, %eax
cmovgl %edi, %eax
=>
xorl %eax, %eax
subl %esi, $edi
cmovsl %eax, %edi
rdar://10633221
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147512 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/ARM/ARMFrameLowering.cpp')
0 files changed, 0 insertions, 0 deletions