[PATCH] D63032: [X86] When promoting i16 compare with immediate to i32, try to use sign_extend for eq/ne if the input is truncated from a type with enough sign its.

Craig Topper via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Jun 9 20:43:42 PDT 2019


craig.topper added a comment.

In D63032#1535622 <https://reviews.llvm.org/D63032#1535622>, @xbolva00 wrote:

> Maybe similar opportunity? But not sure if improvement..
>
> char c() {
>
>   return 11;
>
> }
>
> Clang
>
>   mov al, 11
>
> GCC and ICC
>
>   mov eax 11


I think the icc/gcc version is 6 bytes. clang's version is 3 bytes. But its a partial register update which on Sandybridge and later has a false dependency on the previous writer of al/ax/eax to merge the upper bits.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D63032/new/

https://reviews.llvm.org/D63032





More information about the llvm-commits mailing list