Add a target-specific branchless method for double-width relational
authorEli Friedman <eli.friedman@gmail.com>
Fri, 18 Mar 2011 02:34:11 +0000 (02:34 +0000)
committerEli Friedman <eli.friedman@gmail.com>
Fri, 18 Mar 2011 02:34:11 +0000 (02:34 +0000)
commitb4b8b0cc901ce41a0fb025885897d022eab390f2
tree9c2923505ed4dfcca54242b7c8576cf34d6351b9
parenta4f983970133c934d6af66dc8dc50fbf908c31dd
Add a target-specific branchless method for double-width relational
comparisons on x86.  Essentially, the way this works is that SUB+SBB sets
the relevant flags the same way a double-width CMP would.

This is a substantial improvement over the generic lowering in LLVM. The output
is also shorter than the gcc-generated output; I haven't done any detailed
benchmarking, though.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@127852 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/X86/X86ISelLowering.cpp
test/CodeGen/X86/long-setcc.ll
test/CodeGen/X86/sext-i1.ll