Skip to content

Commit 3065dc6

Browse files
committed
fixup: add sme to target test
1 parent 5fd4f2c commit 3065dc6

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

clang/lib/Sema/SemaChecking.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3184,7 +3184,6 @@ static bool hasSMEZAState(unsigned BuiltinID) {
31843184

31853185
bool Sema::CheckSMEBuiltinFunctionCall(unsigned BuiltinID, CallExpr *TheCall) {
31863186
if (const FunctionDecl *FD = getCurFunctionDecl()) {
3187-
bool debug = FD->getDeclName().getAsString() == "incompat_sve_sm";
31883187
std::optional<ArmStreamingType> BuiltinType;
31893188

31903189
switch (BuiltinID) {

clang/test/Sema/aarch64-sme-intrinsics/acle_sme_target.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ void test_plus_sme(svbool_t pg, void *ptr) __arm_streaming {
2020
svst1_ver_za16(0, 0, pg, ptr);
2121
}
2222

23-
void undefined(svbool_t pg, void *ptr) __arm_streaming { // expected-error {{function executed in streaming-SVE mode requires 'sme'}}
24-
svst1_ver_vnum_za64(0, 0, pg, ptr, 0);
23+
__attribute__((target("+sme")))
24+
void undefined(svbool_t pg, void *ptr) {
25+
svst1_ver_vnum_za64(0, 0, pg, ptr, 0); // expected-warning {{builtin call has undefined behaviour when called from a non-streaming function}}
2526
}

0 commit comments

Comments
 (0)