[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

Djordje Todorovic via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jul 24 10:58:05 PDT 2020


djtodoro added inline comments.


================
Comment at: llvm/lib/Target/X86/X86ISelLowering.cpp:31005
+
+  if (IsEFlagsLive(MI, MBB)) {
+    mainMBB->addLiveIn(X86::EFLAGS);
----------------
craig.topper wrote:
> djtodoro wrote:
> > So this situation can happen *only* for `$EFLAGS`?
> I don't know for sure.  I copied the code from EmitLoweredSelect where expanding CMOV pseudos has the same issue.
Can we make a static function and reuse the interface? I guess we can face this in some other pseudo instructions expanding as well.


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

https://reviews.llvm.org/D84479





More information about the llvm-commits mailing list