This is an archive of the discontinued LLVM Phabricator instance.

[AArch64] Fix inline assembly parsing crash
ClosedPublic

Authored by david-arm on Dec 18 2020, 5:42 AM.

Details

Summary

This patch fixes a crash encountered when compiling this code:

...
float16_t a;
__asm__("fminv %h[a], %[b], %[c].h"
        : [a] "=r" (a)
        : [b] "Upl" (b), [c] "w" (c))

The issue here is when using the 'h' modifier for a register
constraint 'r'.

Diff Detail

Event Timeline

david-arm created this revision.Dec 18 2020, 5:42 AM
david-arm requested review of this revision.Dec 18 2020, 5:42 AM
Herald added a project: Restricted Project. · View Herald TranscriptDec 18 2020, 5:42 AM
c-rhodes added inline comments.Dec 21 2020, 3:51 AM
llvm/test/CodeGen/AArch64/inline-asm-constraints-bad-sve.ll
36

nit: the #1 attribute can be dropped

david-arm updated this revision to Diff 313103.Dec 21 2020, 7:10 AM
c-rhodes accepted this revision.Dec 21 2020, 7:24 AM
This revision is now accepted and ready to land.Dec 21 2020, 7:24 AM
This revision was automatically updated to reflect the committed changes.