[PATCH] D130919: [MRI] isConstantPhysReg should also check if the register is clobbered by a RegMask

Guozhi Wei via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 20 08:01:14 PDT 2022


Carrot marked an inline comment as done.
Carrot added a comment.

In D130919#3802764 <https://reviews.llvm.org/D130919#3802764>, @arichardson wrote:

> In D130919#3802733 <https://reviews.llvm.org/D130919#3802733>, @arsenm wrote:
>
>> Can this be closed with D131958 <https://reviews.llvm.org/D131958>?
>
> I think so (about to commit that revision once I check tests still pass), but it's hard to say if it covers all cases this revision does since there are no tests.

No, a phyiscal register is not a target constant register, but if it is not modified inside a specific function, it can still be treated as a constant register by MachineRegisterInfo::isConstantPhysReg inside the specific function. The modification should include both defined register operand and regmask.

I will update this patch. But it still depends on D132987 <https://reviews.llvm.org/D132987> and D132561 <https://reviews.llvm.org/D132561> to prevent regressions. These are real problems exposed by this patch.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D130919



More information about the llvm-commits mailing list