This is an archive of the discontinued LLVM Phabricator instance.

[LoongArch] Modify ParserMethod for the simm26_b operand type
ClosedPublic

Authored by wangleiat on Oct 17 2022, 5:52 AM.

Details

Summary

Modify the ParserMethod of simm26_b operand type to parseImmediate.

Before that, for the simm26_b operand type, the same ParserMethod
was used as simm26_bl. When using the internal assembler to process
the blockaddress with asm instruction, the wrong blockaddress symbol
would be generated due to the call to the getOrCreateSymbol()
interface.

Diff Detail

Event Timeline

wangleiat created this revision.Oct 17 2022, 5:52 AM
Herald added a project: Restricted Project. · View Herald TranscriptOct 17 2022, 5:52 AM
wangleiat requested review of this revision.Oct 17 2022, 5:52 AM
Herald added a project: Restricted Project. · View Herald TranscriptOct 17 2022, 5:52 AM
xen0n accepted this revision.Oct 17 2022, 7:26 PM

LGTM apart from the grammatical nit. Thanks.

llvm/test/CodeGen/LoongArch/blockaddress-symbol.ll
8–10

Active voice may be clearer here, also it's not the test that is preventing the regression:

"This regression test is for ensuring the AsmParser does not use the getOrCreateSymbol interface to create blockaddress symbols."

This revision is now accepted and ready to land.Oct 17 2022, 7:26 PM
wangleiat added inline comments.Oct 17 2022, 7:32 PM
llvm/test/CodeGen/LoongArch/blockaddress-symbol.ll
8–10

Active voice may be clearer here, also it's not the test that is preventing the regression:

"This regression test is for ensuring the AsmParser does not use the getOrCreateSymbol interface to create blockaddress symbols."

Thank you very much!

wangleiat updated this revision to Diff 468397.Oct 17 2022, 7:33 PM

Address xen0n's comments.

SixWeining accepted this revision.Oct 21 2022, 2:00 AM
This revision was automatically updated to reflect the committed changes.