diff options
author | Nadav Rotem <nrotem@apple.com> | 2012-10-10 21:31:55 +0000 |
---|---|---|
committer | Nadav Rotem <nrotem@apple.com> | 2012-10-10 21:31:55 +0000 |
commit | 17418964f8133a7200ab708338c5faefae36da6d (patch) | |
tree | 8e0b4d0136085a65f0766dd2281f6a20996c4111 /lldb/scripts/Python/python-extensions.swig | |
parent | fb29410c85a632e328877a6310b57b33908156ac (diff) | |
download | llvm-17418964f8133a7200ab708338c5faefae36da6d.zip llvm-17418964f8133a7200ab708338c5faefae36da6d.tar.gz llvm-17418964f8133a7200ab708338c5faefae36da6d.tar.bz2 |
Patch by Shuxin Yang <shuxin.llvm@gmail.com>.
Original message:
The attached is the fix to radar://11663049. The optimization can be outlined by following rules:
(select (x != c), e, c) -> select (x != c), e, x),
(select (x == c), c, e) -> select (x == c), x, e)
where the <c> is an integer constant.
The reason for this change is that : on x86, conditional-move-from-constant needs two instructions;
however, conditional-move-from-register need only one instruction.
While the LowerSELECT() sounds to be the most convenient place for this optimization, it turns out to be a bad place. The reason is that by replacing the constant <c> with a symbolic value, it obscure some instruction-combining opportunities which would otherwise be very easy to spot. For that reason, I have to postpone the change to last instruction-combining phase.
The change passes the test of "make check-all -C <build-root/test" and "make -C project/test-suite/SingleSource".
llvm-svn: 165661
Diffstat (limited to 'lldb/scripts/Python/python-extensions.swig')
0 files changed, 0 insertions, 0 deletions