[PATCH] D82258: [RegisterCoalescer] Fix IMPLICIT_DEF init removal for a register on joining

Quentin Colombet via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 22 10:55:01 PDT 2020


qcolombet added a comment.

Hi,

> Why would we need to keep this impdef?

In your last example we wouldn't.

I was referring to the test case in your patch.
We have:

  if (<cond>)
    undef A.sub0 = <some value>
  else
    undef B.sub0 = IMPLICIT_DEF
  C = phi(A, B)

I was wondering if we would get a machine verifier error if we were to eliminate the implicit def for B.

Now looking at the before and after of the dump of the test case in your patch, I see that yes, we remove an implicit def, but there is still another one after (and correct this time.)

Cheers,
-Quentin


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D82258



More information about the llvm-commits mailing list