[PATCH] D22360: [AArch64] Set COPY ZR isAsCheapAsAMove when needed.

Haicheng Wu via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 14 12:25:07 PDT 2016


haicheng added a comment.

In https://reviews.llvm.org/D22360#484533, @MatzeB wrote:

> > Unfortunately, several benchmarks have double-digit regression. However, on Kryo, setting any COPY isAsCheapAsAMove brings small win, but restricting it to COPY ZR is slightly better.
>
>
> Wow! I would never expect that to have such a huge effect, we may have a bug or bad strategy somewhere in the generic codegen. It would certainly be interesting to learn why we have those huge swings...
>
> In any case this patch LGTM.


Thank you again, Matthias.

Actually, if I replace

  case TargetOpcode::COPY:
      return true;

by

  default:
      return isZeroCost(MI);

All double-digit regressions are gone on A57.  Only omnetpp has -3.6% regression and povray has -2.2% regression on A57.  isZeroCost() includes COPY and other cheap general pseudo instructions.


Repository:
  rL LLVM

https://reviews.llvm.org/D22360





More information about the llvm-commits mailing list