[PATCH] D139679: [X86] Don't zero out %eax if both %al and %ah are used

Bill Wendling via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Dec 9 12:05:43 PST 2022


void added a comment.

In D139679#3985095 <https://reviews.llvm.org/D139679#3985095>, @nickdesaulniers wrote:

>> The iterator over super and sub registers doesn't include both 8-bit registers in its list.
>
> This is the use of `sub_and_superregs_inclusive` in the caller `PEI::insertZeroCallUsedRegs()` that you're referring to? Does that need to be fixed? Is there another iterator that gives us both? Should there be?  Maybe @pengfei , @RKSimon , or @craig.topper knows?
>
> The generated `TargetRegisterClass` for `GR8RegClass` and `GRH8RegClass` BOTH have set `CoveredBySubRegs` to `false`.

That might be by design, if by sub register they mean something like `%al` is a sub register of `%ax`, because they "overlap."


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D139679



More information about the llvm-commits mailing list