This is an archive of the discontinued LLVM Phabricator instance.

AMDGPU: Directly emit m0 initialization with s_mov_b32
ClosedPublic

Authored by arsenm on Apr 13 2016, 12:03 PM.

Details

Reviewers
tstellarAMD
Summary

Currently what comes out of instruction selection is a
register initialized to -1, and then copied to m0.
MachineCSE doesn't consider copies, but we want these
to be CSEed. This isn't much of a problem currently,
because SIFoldOperands is run immediately after.

This avoids regressions when SIFoldOperands is run later
from leaving all copies to m0.

Diff Detail

Event Timeline

arsenm updated this revision to Diff 53604.Apr 13 2016, 12:03 PM
arsenm retitled this revision from to AMDGPU: Directly emit m0 initialization with s_mov_b32.
arsenm updated this object.
arsenm added a reviewer: tstellarAMD.
arsenm added a subscriber: llvm-commits.
tstellarAMD accepted this revision.Apr 14 2016, 7:22 AM
tstellarAMD edited edge metadata.

LGTM.

This revision is now accepted and ready to land.Apr 14 2016, 7:22 AM
arsenm closed this revision.Apr 14 2016, 3:04 PM

r266377