This is an archive of the discontinued LLVM Phabricator instance.

AMDGPU: Workaround for instruction size with literals
ClosedPublic

Authored by arsenm on Oct 11 2016, 10:51 PM.

Details

Summary

Instructions with a 32-bit base encoding with an optional
32-bit literal encoded after them report their size as 4
for the disassembler. Consider these when computing the
MachineInstr size. This fixes problems caused by size estimate
consistency in BranchRelaxation.

Diff Detail

Event Timeline

arsenm updated this revision to Diff 74326.Oct 11 2016, 10:51 PM
arsenm retitled this revision from to AMDGPU: Workaround for instruction size with literals.
arsenm updated this object.
arsenm added a subscriber: llvm-commits.

Wrong patch? I don't see the relationship between the diff and the description.

arsenm updated this revision to Diff 74707.Oct 14 2016, 9:51 AM
arsenm edited edge metadata.

Attach right patch

nhaehnle accepted this revision.Oct 18 2016, 4:04 AM
nhaehnle added a reviewer: nhaehnle.

LGTM

This revision is now accepted and ready to land.Oct 18 2016, 4:04 AM
arsenm updated this revision to Diff 76614.Nov 1 2016, 12:24 PM
arsenm edited edge metadata.

Fix crashes on new instructions. Some of the GPR indexing instructions are special cases because they have special immediates in place of the normal behaving src0/src1. Add a bit to know that checking the operands should be skipped

arsenm closed this revision.Nov 1 2016, 1:52 PM

r285743