This is an archive of the discontinued LLVM Phabricator instance.

Handle non-~0 lane masks on live-in registers in LivePhysRegs
ClosedPublic

Authored by kparzysz on Oct 28 2016, 12:17 PM.

Details

Summary

When LivePhysRegs adds live-in registers, it recognizes ~0 as a special lane mask indicating the entire register. If the lane mask is not ~0, it will only add the subregisters that overlap the specified lane mask. The problem is that if a live-in register does not have subregisters, and the lane mask is not ~0, it will not be added to the live set. (The given lane mask may simply be the lane mask of its register class.)
If a register does not have subregisters, add it to the live set if the lane mask is non-zero.

Diff Detail

Repository
rL LLVM

Event Timeline

kparzysz updated this revision to Diff 76234.Oct 28 2016, 12:17 PM
kparzysz retitled this revision from to Handle non-~0 lane masks on live-in registers in LivePhysRegs.
kparzysz updated this object.
kparzysz added a reviewer: MatzeB.
kparzysz set the repository for this revision to rL LLVM.
kparzysz added a subscriber: llvm-commits.
MatzeB accepted this revision.Oct 28 2016, 12:48 PM
MatzeB edited edge metadata.

LGTM.

lib/CodeGen/LivePhysRegs.cpp
151–154 ↗(On Diff #76234)

change this to a for ( ; S.isValid(); ++S) { ... } loop?

This revision is now accepted and ready to land.Oct 28 2016, 12:48 PM
This revision was automatically updated to reflect the committed changes.