This is an archive of the discontinued LLVM Phabricator instance.

MachineVerifier: Allow undef reads if a matching superreg is defined.
ClosedPublic

Authored by MatzeB on Jan 14 2015, 11:41 AM.

Details

Summary

Some pseudo instruction expansions break down a wide register use into
multiple uses of smaller sub registers. If the super register was
partially undefined the broken down sub registers may be completely
undefined now leading to MachineVerifier complaints. Unfortunately
liveness information to add the required dead flags is not easily
(cheaply) available when expanding pseudo instructions.

This commit changes the verifier to be quiet if there is an additional
implicit use of a super register. Pseudo instruction expanders can use
this to mark cases where partially defined values get potentially broken
into completely undefined ones.

Diff Detail

Repository
rL LLVM

Event Timeline

MatzeB updated this revision to Diff 18171.Jan 14 2015, 11:41 AM
MatzeB retitled this revision from to MachineVerifier: Allow undef reads if a matching superreg is defined..
MatzeB updated this object.
MatzeB edited the test plan for this revision. (Show Details)
MatzeB added a reviewer: qcolombet.
MatzeB added a subscriber: Unknown Object (MLST).
qcolombet accepted this revision.Jan 14 2015, 2:13 PM
qcolombet edited edge metadata.

Hi Matthias,

LGTM.
I guess this was failing only when sub register liveness will be enabled by default.
Could you add in the related PR the test case that we would need to commit to match-up this patch?

Thanks,
-Quentin

This revision is now accepted and ready to land.Jan 14 2015, 2:13 PM

There are several test cases failing when enabling subregister liveness for the ARM target, you need this piece of code and an additional patch I haven't published yet to fix them. So I don't think this requires further tests.

Greetings

Matthias
This revision was automatically updated to reflect the committed changes.

SGTM.
Thanks for the clarifications.

Q.

foad added a subscriber: foad.Nov 8 2021, 8:22 AM
Herald added a project: Restricted Project. · View Herald TranscriptNov 8 2021, 8:22 AM