-
Notifications
You must be signed in to change notification settings - Fork 10.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[AArch64] Warn when calling a NEON builtin in a streaming function (#…
…73672) This patch introduces a warning that is emitted when a Neon builtin is called from a streaming function, as that situation is not supported. Uses work by Kerry McLaughlin.
- Loading branch information
1 parent
1f88e62
commit 5234fe3
Showing
3 changed files
with
74 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
// NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py | ||
// RUN: %clang_cc1 -triple aarch64-none-linux-gnu -target-feature +sve \ | ||
// RUN: -target-feature +sme -target-feature +sve2 -target-feature +neon -fsyntax-only -verify %s | ||
|
||
// REQUIRES: aarch64-registered-target | ||
|
||
#include "arm_neon.h" | ||
|
||
int16x8_t incompat_neon_sm(int16x8_t splat) __arm_streaming { | ||
// expected-warning@+1 {{builtin call has undefined behaviour when called from a streaming function}} | ||
return (int16x8_t)__builtin_neon_vqaddq_v((int8x16_t)splat, (int8x16_t)splat, 33); | ||
} | ||
|
||
__arm_locally_streaming int16x8_t incompat_neon_ls(int16x8_t splat) { | ||
// expected-warning@+1 {{builtin call has undefined behaviour when called from a streaming function}} | ||
return (int16x8_t)__builtin_neon_vqaddq_v((int8x16_t)splat, (int8x16_t)splat, 33); | ||
} | ||
|
||
int16x8_t incompat_neon_smc(int16x8_t splat) __arm_streaming_compatible { | ||
// expected-warning@+1 {{builtin call has undefined behaviour when called from a streaming compatible function}} | ||
return (int16x8_t)__builtin_neon_vqaddq_v((int8x16_t)splat, (int8x16_t)splat, 33); | ||
} |