Skip to content

Commit e3a3397

Browse files
Revert "[Clang] Demote always_inline error to warning for mismatching SME attrs" (#100991)
Reverts #100740
1 parent 5bd3aef commit e3a3397

File tree

3 files changed

+5
-10
lines changed

3 files changed

+5
-10
lines changed

clang/include/clang/Basic/DiagnosticFrontendKinds.td

-3
Original file line numberDiff line numberDiff line change
@@ -288,9 +288,6 @@ def err_function_needs_feature : Error<
288288
let CategoryName = "Codegen ABI Check" in {
289289
def err_function_always_inline_attribute_mismatch : Error<
290290
"always_inline function %1 and its caller %0 have mismatching %2 attributes">;
291-
def warn_function_always_inline_attribute_mismatch : Warning<
292-
"always_inline function %1 and its caller %0 have mismatching %2 attributes, "
293-
"inlining may change runtime behaviour">, InGroup<AArch64SMEAttributes>;
294291
def err_function_always_inline_new_za : Error<
295292
"always_inline function %0 has new za state">;
296293

clang/lib/CodeGen/Targets/AArch64.cpp

+2-4
Original file line numberDiff line numberDiff line change
@@ -883,10 +883,8 @@ void AArch64TargetCodeGenInfo::checkFunctionCallABIStreaming(
883883

884884
if (!CalleeIsStreamingCompatible &&
885885
(CallerIsStreaming != CalleeIsStreaming || CallerIsStreamingCompatible))
886-
CGM.getDiags().Report(
887-
CallLoc, CalleeIsStreaming
888-
? diag::err_function_always_inline_attribute_mismatch
889-
: diag::warn_function_always_inline_attribute_mismatch)
886+
CGM.getDiags().Report(CallLoc,
887+
diag::err_function_always_inline_attribute_mismatch)
890888
<< Caller->getDeclName() << Callee->getDeclName() << "streaming";
891889
if (auto *NewAttr = Callee->getAttr<ArmNewAttr>())
892890
if (NewAttr->isNewZA())

clang/test/CodeGen/aarch64-sme-inline-streaming-attrs.c

+3-3
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ void caller(void) {
2020

2121
#ifdef TEST_COMPATIBLE
2222
void caller_compatible(void) __arm_streaming_compatible {
23-
inlined_fn(); // expected-warning {{always_inline function 'inlined_fn' and its caller 'caller_compatible' have mismatching streaming attributes, inlining may change runtime behaviour}}
23+
inlined_fn(); // expected-error {{always_inline function 'inlined_fn' and its caller 'caller_compatible' have mismatching streaming attributes}}
2424
inlined_fn_streaming_compatible();
2525
inlined_fn_streaming(); // expected-error {{always_inline function 'inlined_fn_streaming' and its caller 'caller_compatible' have mismatching streaming attributes}}
2626
inlined_fn_local(); // expected-error {{always_inline function 'inlined_fn_local' and its caller 'caller_compatible' have mismatching streaming attributes}}
@@ -29,7 +29,7 @@ void caller_compatible(void) __arm_streaming_compatible {
2929

3030
#ifdef TEST_STREAMING
3131
void caller_streaming(void) __arm_streaming {
32-
inlined_fn(); // expected-warning {{always_inline function 'inlined_fn' and its caller 'caller_streaming' have mismatching streaming attributes, inlining may change runtime behaviour}}
32+
inlined_fn(); // expected-error {{always_inline function 'inlined_fn' and its caller 'caller_streaming' have mismatching streaming attributes}}
3333
inlined_fn_streaming_compatible();
3434
inlined_fn_streaming();
3535
inlined_fn_local();
@@ -39,7 +39,7 @@ void caller_streaming(void) __arm_streaming {
3939
#ifdef TEST_LOCALLY
4040
__arm_locally_streaming
4141
void caller_local(void) {
42-
inlined_fn(); // expected-warning {{always_inline function 'inlined_fn' and its caller 'caller_local' have mismatching streaming attributes, inlining may change runtime behaviour}}
42+
inlined_fn(); // expected-error {{always_inline function 'inlined_fn' and its caller 'caller_local' have mismatching streaming attributes}}
4343
inlined_fn_streaming_compatible();
4444
inlined_fn_streaming();
4545
inlined_fn_local();

0 commit comments

Comments
 (0)