[PATCH] D90965: [IfCvt] Don't use pristine register for counting liveins for predicated instructions.

Eli Friedman via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Jul 10 13:12:25 PDT 2021


efriedma accepted this revision.
efriedma added a comment.
This revision is now accepted and ready to land.

Let me see if I understand what's going on here:

1. You have a load with a dead result register.
2. ifcvt doesn't care that it's dead; it treats it like a live result.
3. Since we're treating the result as live, if the input is live, we need to add it as an implicit use.
4. ifcvt thinks the pristine register is live, but it really isn't.

I guess this is the right fix, then; LGTM.

That said, ifconversion should probably be fixed at some point to step backwards, rather than forwards.  Stepping through a block forwards is sort of deprecated.


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

https://reviews.llvm.org/D90965



More information about the llvm-commits mailing list