This is an archive of the discontinued LLVM Phabricator instance.

[AMDGPU][MC] Corrected handling of relocatable expressions
ClosedPublic

Authored by dp on Sep 20 2019, 6:06 AM.

Details

Summary

Relocatable expressions may be used as operands; however they are not accounted for when computing the total number of literals used by an instruction.

See bug 43359: https://bugs.llvm.org//show_bug.cgi?id=43359

Diff Detail

Event Timeline

dp created this revision.Sep 20 2019, 6:06 AM
rampitec accepted this revision.Sep 20 2019, 8:13 AM

LGTM

Does it need the same fix in the codegen?

This revision is now accepted and ready to land.Sep 20 2019, 8:13 AM
dp added a comment.Sep 20 2019, 10:22 AM

I believe codegen does not need any changes. Symbols like MO_ExternalSymbol, etc are handled by SIInstrInfo::usesConstantBus and SIInstrInfo::isLiteralConstantLike.

This revision was automatically updated to reflect the committed changes.
Herald added a project: Restricted Project. · View Herald TranscriptSep 23 2019, 8:40 AM