This is an archive of the discontinued LLVM Phabricator instance.

[Clang][LoongArch] Add intrinsic for asrtle, asrtgt, lddir, ldpte and cpucfg
ClosedPublic

Authored by gonglingqin on Dec 12 2022, 11:26 PM.

Diff Detail

Event Timeline

gonglingqin created this revision.Dec 12 2022, 11:26 PM
Herald added a project: Restricted Project. · View Herald TranscriptDec 12 2022, 11:26 PM
gonglingqin requested review of this revision.Dec 12 2022, 11:26 PM
Herald added projects: Restricted Project, Restricted Project. · View Herald TranscriptDec 12 2022, 11:26 PM

Linux only requires __cpucfg among the ones you just added. Please amend the patch summary so it's more accurate.

Otherwise LGTM, thanks!

llvm/lib/Target/LoongArch/LoongArchISelLowering.cpp
799

#undef ASRT_LE_GT_CASE afterwards?

Linux only requires __cpucfg among the ones you just added. Please amend the patch summary so it's more accurate.

Otherwise LGTM, thanks!

Thanks for your review, I will modify the summary.

llvm/lib/Target/LoongArch/LoongArchISelLowering.cpp
799

Thanks! I will modify it. And there are other similar problems in this file, which I will modify later.

gonglingqin edited the summary of this revision. (Show Details)Dec 12 2022, 11:41 PM

Address @xen0n's comments.

SixWeining accepted this revision.Dec 20 2022, 7:25 PM

LGTM except a small nit.

llvm/lib/Target/LoongArch/LoongArchISelLowering.h
91

Better to leave some comment like line 82?

This revision is now accepted and ready to land.Dec 20 2022, 7:25 PM
gonglingqin added inline comments.Dec 20 2022, 10:07 PM
llvm/lib/Target/LoongArch/LoongArchISelLowering.h
91

Thanks, I'll add comments.

Add comment.