This is an archive of the discontinued LLVM Phabricator instance.

[LiveIntervals] Split live intervals on any dead def
ClosedPublic

Authored by dfukalov on Jul 25 2022, 5:36 AM.

Details

Summary

Each dead def of the same virtual register is required to be split into multiple
virtual registers with separate live intervals to avoid MachineVerifier error.

Partially fixes https://github.com/llvm/llvm-project/issues/56050 and
https://github.com/llvm/llvm-project/issues/56051

Diff Detail

Event Timeline

dfukalov created this revision.Jul 25 2022, 5:36 AM
Herald added a project: Restricted Project. · View Herald TranscriptJul 25 2022, 5:36 AM
dfukalov requested review of this revision.Jul 25 2022, 5:36 AM
Herald added a project: Restricted Project. · View Herald TranscriptJul 25 2022, 5:36 AM
Herald added a subscriber: wdng. · View Herald Transcript
foad added a comment.Jul 26 2022, 2:52 AM

Thanks for working on this! Sorry I don't know this code well enough to do a proper review.

foad added a comment.Jul 26 2022, 5:01 AM

Fixes https://github.com/llvm/llvm-project/issues/56050 and
https://github.com/llvm/llvm-project/issues/56051

It does not fix all the problems. With just D129208 I get:

Failed Tests (6):
  LLVM :: CodeGen/AMDGPU/optimize-negated-cond-exec-masking-wave32.mir
  LLVM :: CodeGen/AMDGPU/optimize-negated-cond-exec-masking.mir
  LLVM :: CodeGen/AMDGPU/spill-before-exec.mir
  LLVM :: CodeGen/Hexagon/expand-condsets-def-undef.mir
  LLVM :: CodeGen/Hexagon/expand-condsets-rm-reg.mir
  LLVM :: CodeGen/Hexagon/expand-condsets-same-inputs.mir

With D129208 + D130477 I get:

Failed Tests (3):
  LLVM :: CodeGen/AMDGPU/optimize-negated-cond-exec-masking-wave32.mir
  LLVM :: CodeGen/AMDGPU/optimize-negated-cond-exec-masking.mir
  LLVM :: CodeGen/Hexagon/expand-condsets-def-undef.mir

With D129208 + D130477 I get:

Failed Tests (3):
  LLVM :: CodeGen/AMDGPU/optimize-negated-cond-exec-masking-wave32.mir
  LLVM :: CodeGen/AMDGPU/optimize-negated-cond-exec-masking.mir
  LLVM :: CodeGen/Hexagon/expand-condsets-def-undef.mir

Yes, I was too optimistic: the patch fixes "Multiple connected components in live interval" issues in AMDGPU/* tests but reveals next issue related to incorrect updates of ranges.
Regarding Hexagon/expand-condsets-def-undef.mir test issue - it is steel about multiple connected components.

Investigating these cases further.

dfukalov edited the summary of this revision. (Show Details)Aug 17 2022, 2:43 PM
qcolombet accepted this revision.Sep 1 2022, 4:30 PM
This revision is now accepted and ready to land.Sep 1 2022, 4:30 PM
This revision was landed with ongoing or failed builds.Sep 2 2022, 10:00 AM
This revision was automatically updated to reflect the committed changes.