[PATCH] D121874: [AMDGPU] Fix PreRARematerialize scheduler pass sinking undef instruction

Stanislav Mekhanoshin via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Mar 17 11:16:52 PDT 2022


rampitec added a comment.

In D121874#3389967 <https://reviews.llvm.org/D121874#3389967>, @vangthao wrote:

> In D121874#3389932 <https://reviews.llvm.org/D121874#3389932>, @rampitec wrote:
>
>> I thought we do not rematerialize subreg defs at all?
>
> I incorrectly assumed when defining a subreg, there would be multiple defs for the other parts of the reg so checking `hasOneDef()` would be sufficient. However in this case, there was a single def of a subreg `undef %23.sub1` without any def for sub0.

I would suggest to prohibit rematerialization of subreg defs completely instead.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D121874



More information about the llvm-commits mailing list