diff options
author | Manman Ren <mren@apple.com> | 2012-05-01 17:16:15 +0000 |
---|---|---|
committer | Manman Ren <mren@apple.com> | 2012-05-01 17:16:15 +0000 |
commit | 425a55c1ce69636bd69ba74e2849c01ebcc77e46 (patch) | |
tree | 916edf1f653b2424f9168acdd01cdae60d2aa6a5 /clang/test/CodeGenCXX/member-data-pointers.cpp | |
parent | bff1bfc6be0615ba3036a861fd27b75c96e3297c (diff) | |
download | bcm5719-llvm-425a55c1ce69636bd69ba74e2849c01ebcc77e46.tar.gz bcm5719-llvm-425a55c1ce69636bd69ba74e2849c01ebcc77e46.zip |
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
llvm-svn: 155919
Diffstat (limited to 'clang/test/CodeGenCXX/member-data-pointers.cpp')
0 files changed, 0 insertions, 0 deletions