This is an archive of the discontinued LLVM Phabricator instance.

AMDGPU/SI: Fix read2 merging into a super register.
ClosedPublic

Authored by arsenm on Jul 6 2015, 5:10 PM.

Details

Reviewers
tstellarAMD
Summary

If the read2 produced was supposed to be writing into a
super register, it would use the wrong subregister indices.
Fix this by inserting copies, so we only ever write to a vreg_64.
Run the register coalescer again to clean this up, although this
isn't ideal and often does result in an extra move.

Also remove the assert that offset1 > offset0.

There isn't a real reason to not allow this other than a minor
convenience in the compiler, and it doesn't seem worth the effort
of avoiding it.

Diff Detail

Event Timeline

arsenm updated this revision to Diff 29139.Jul 6 2015, 5:10 PM
arsenm retitled this revision from to AMDGPU/SI: Fix read2 merging into a super register..
arsenm updated this object.
arsenm added a subscriber: llvm-commits.

ping. This is sort of a temporary solution since I think eventually this pass should be replaced with a DAG combine

This revision is now accepted and ready to land.Jul 14 2015, 7:08 AM
arsenm closed this revision.Jul 14 2015, 10:59 AM

r242174