X86: Perform integer comparisons at i32 or larger.
authorJim Grosbach <grosbach@apple.com>
Fri, 22 Nov 2013 19:57:47 +0000 (19:57 +0000)
committerJim Grosbach <grosbach@apple.com>
Fri, 22 Nov 2013 19:57:47 +0000 (19:57 +0000)
commite1af5f6ad178e76429b58759042f061247d90435
tree1d793a0ec2a79a8a05dc9d445d48bdf998050808
parent22bc1320b5e8e9ac8007686e73f0c55493254188
X86: Perform integer comparisons at i32 or larger.

Utilizing the 8 and 16 bit comparison instructions, even when an input can
be folded into the comparison instruction itself, is typically not worth it.
There are too many partial register stalls as a result, leading to significant
slowdowns. By always performing comparisons on at least 32-bit
registers, performance of the calculation chain leading to the
comparison improves. Continue to use the smaller comparisons when
minimizing size, as that allows better folding of loads into the
comparison instructions.

rdar://15386341

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@195496 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/X86/X86ISelLowering.cpp
test/CodeGen/X86/2007-10-17-IllegalAsm.ll [deleted file]
test/CodeGen/X86/3addr-16bit.ll
test/CodeGen/X86/codegen-prepare-extload.ll
test/CodeGen/X86/ctpop-combine.ll
test/CodeGen/X86/memcmp.ll
test/CodeGen/X86/shrink-compare.ll