[PATCH] D84479: [X86] Detect if EFLAGs is live across XBEGIN pseudo instruction. Add it as livein to the basic blocks created when expanding the pseudo

Ivan Baev via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Jul 25 00:10:09 PDT 2020


ivanbaev added a comment.

Yes, check for mi.killsRegister(X86::EFLAGS)) before a def (in backward order).
The instructions in mainMBB and fallBB during xbegin() expansion do not deal with EFLAGS. If a subsequent pass makes changes in mainMBB and fallBB that might impact the liveness of EFLAGS, that pass should make proper updates. Having

  mainMBB->addLiveIn(X86::EFLAGS);
  fallMBB->addLiveIn(X86::EFLAGS);

is good too.


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

https://reviews.llvm.org/D84479





More information about the llvm-commits mailing list