This is an archive of the discontinued LLVM Phabricator instance.

X86InstrInfo::copyPhysReg: workaround reg liveness
ClosedPublic

Authored by jfb on Dec 3 2015, 10:55 AM.

Details

Summary

computeRegisterLiveness and analyzePhysReg are currently getting
confused about liveness in some cases, breaking copyPhysReg's
calculation of whether AX is dead in some cases. Work around this issue
temporarily by assuming that AX is always live.

See detail in: https://llvm.org/bugs/show_bug.cgi?id=25033#c7
And associated bugs PR24535 PR25033 PR24991 PR24992 PR25201.

This workaround makes the code correct but slightly inefficient, but it
seems to confuse the machine instr verifier which now things EAX was
undefined in some cases where it's being conservatively saved /
restored.

Diff Detail

Repository
rL LLVM

Event Timeline

jfb updated this revision to Diff 41782.Dec 3 2015, 10:55 AM
jfb retitled this revision from to X86InstrInfo::copyPhysReg: workaround reg liveness.
jfb updated this object.
jfb added reviewers: majnemer, sanjoy.
jfb added a subscriber: llvm-commits.
majnemer accepted this revision.Dec 3 2015, 12:54 PM
majnemer edited edge metadata.

LGTM

This revision is now accepted and ready to land.Dec 3 2015, 12:54 PM
jfb updated this revision to Diff 41835.Dec 3 2015, 5:18 PM
jfb edited edge metadata.
  • Fix temporary MI verif issue caused by D15157.
This revision was automatically updated to reflect the committed changes.