This is an archive of the discontinued LLVM Phabricator instance.

[Clang][RISCV] Fix RISC-V vector / SiFive intrinsic inclusion in SemaLookup
ClosedPublic

Authored by eopXD on Jun 29 2023, 1:40 AM.

Details

Summary

The existing code assumes that both DeclareRISCVVBuiltins and
DeclareRISCVSiFiveVectorBuiltins are set when coming into the if-statement
under SemaLookup.cpp.

This is not the case and causes issue #63571.

This patch resolves the issue.

Diff Detail

Event Timeline

eopXD created this revision.Jun 29 2023, 1:40 AM
Herald added a project: Restricted Project. · View Herald TranscriptJun 29 2023, 1:40 AM
eopXD requested review of this revision.Jun 29 2023, 1:40 AM
Herald added a project: Restricted Project. · View Herald TranscriptJun 29 2023, 1:40 AM
eopXD updated this revision to Diff 535677.Jun 29 2023, 1:46 AM

Add test case of C++ compilation rvv-intrinsics-handcrafted/xsfvcp.cpp

kito-cheng accepted this revision.Jun 29 2023, 2:41 AM

LGTM, thanks for quick fix!

This revision is now accepted and ready to land.Jun 29 2023, 2:41 AM
eopXD updated this revision to Diff 535722.Jun 29 2023, 4:43 AM

Bump CI.

4vtomat accepted this revision.Jun 29 2023, 5:12 AM

LGTM, thanks~

eopXD edited the summary of this revision. (Show Details)Jun 29 2023, 5:23 AM
This revision was landed with ongoing or failed builds.Jun 29 2023, 5:24 AM
This revision was automatically updated to reflect the committed changes.
jrtc27 added inline comments.Jun 29 2023, 7:45 AM
clang/lib/Sema/SemaRISCVVectorLookup.cpp
201

As far as I can tell this refactoring was entirely gratuitous, and perhaps a regression given the function is only ever used by InitIntrinsicList and thus can be hidden as a lambda?