[PATCH] D21144: [X86]: Quit promoting 8 and 16 bit compares to 32 bit.

Dehao Chen via llvm-commits llvm-commits at lists.llvm.org
Tue Jun 21 15:51:36 PDT 2016


danielcdh added a subscriber: danielcdh.
danielcdh added a comment.

In http://reviews.llvm.org/D21144#453975, @kbsmith1 wrote:

> Updated changes so this will continue to promote 16 bit compares to 32 bits if one of the compare
>  operands is a constant.  This addresses Eli Friedman's comment.


Yes, 16bit immediate constant may introduce LCP that may end up hurting performance. But on newer architectures (sandybridge and later), this problem is much less severe, especially when the loop body fits in LSD. I don't think it's a good idea to blindly convert all 16bit immediate constant comparison to 32bit.


Repository:
  rL LLVM

http://reviews.llvm.org/D21144





More information about the llvm-commits mailing list