This is an archive of the discontinued LLVM Phabricator instance.

[AMDGPU] Added 'A' constraint for inline assembler
ClosedPublic

Authored by dp on May 6 2020, 8:19 AM.

Details

Summary

Added 'A' constraint which requires an integer or a floating-point inline constant.

Diff Detail

Event Timeline

dp created this revision.May 6 2020, 8:19 AM
dp marked an inline comment as done.May 6 2020, 8:28 AM
dp added inline comments.
clang/test/Sema/inline-asm-validate-amdgpu.cl
22

arsenm wrote: Missing validation for acceptable values?

I'm not sure it is possible to validate input values at this point because we do not know input value size. For example, 0x3118 is an inlineable value for f16, but not for f32.

arsenm accepted this revision.May 6 2020, 8:49 AM
arsenm added inline comments.
clang/test/Sema/inline-asm-validate-amdgpu.cl
22

I would expect us to know the type from the C type, but I think we are accepting int for 16-bit asm currently

This revision is now accepted and ready to land.May 6 2020, 8:49 AM
This revision was automatically updated to reflect the committed changes.
Herald added a project: Restricted Project. · View Herald TranscriptMay 25 2020, 8:01 AM
Herald added a subscriber: cfe-commits. · View Herald Transcript