This is an archive of the discontinued LLVM Phabricator instance.

[SelectionDAG] In InstrEmitter, handle EXTRACT_SUBREG of a physical register.
ClosedPublic

Authored by gberry on Feb 3 2017, 8:39 AM.

Details

Summary

Without this change, the getVR() call would hit an assert since it was
being passed a physical register.

Update the AArch64/ldst-opt.ll test with a case that triggers this
behavior by adding a run with strict-align, which causes an unaligned
STR XZR instruction to be split into byte stores, creating an
EXTRACT_SUBREG of XZR that triggers the original problem.

Diff Detail

Repository
rL LLVM

Event Timeline

gberry created this revision.Feb 3 2017, 8:39 AM
gberry added a comment.Feb 3 2017, 8:42 AM

FWIW, I'd like to get this considered for the release branch.

gberry added a subscriber: hans.Feb 3 2017, 8:45 AM
This revision is now accepted and ready to land.Feb 3 2017, 9:26 AM
This revision was automatically updated to reflect the committed changes.