This is an archive of the discontinued LLVM Phabricator instance.

[Clang][LoongArch] Use the ClangBuiltin class to automatically generate support for CBE and CFE
ClosedPublic

Authored by wangleiat on Aug 2 2023, 2:22 AM.

Details

Summary

Fixed the type modifier (L->W), removed redundant feature checking code
since the feature has already been checked in EmitBuiltinExpr. And
Cleaned up unused diagnostic information.

Diff Detail

Event Timeline

wangleiat created this revision.Aug 2 2023, 2:22 AM
Herald added a project: Restricted Project. · View Herald TranscriptAug 2 2023, 2:22 AM
Herald added a subscriber: hiraditya. · View Herald Transcript
wangleiat requested review of this revision.Aug 2 2023, 2:22 AM
Herald added projects: Restricted Project, Restricted Project. · View Herald TranscriptAug 2 2023, 2:23 AM

LGTM except a nit.

clang/lib/CodeGen/CGBuiltin.cpp
20362

The declaration in clang/lib/CodeGen/CodeGenFunction.h should also be deleted.

wangleiat updated this revision to Diff 547072.Aug 3 2023, 6:07 PM

Address @SixWeining's commonts.

wangleiat marked an inline comment as done.Aug 3 2023, 6:08 PM
SixWeining accepted this revision.Aug 3 2023, 6:10 PM

The change is loongarch-specific and it looks goold to me.

This revision is now accepted and ready to land.Aug 3 2023, 6:10 PM
MaskRay added a subscriber: MaskRay.Aug 9 2023, 7:29 AM
MaskRay added inline comments.
clang/test/CodeGen/LoongArch/intrinsic-la32-error.c
2

d64c363f35b98ab9750a3c3a5828d8df011a4a45 added -o /dev/null to fix the test when CWD is not writable.