-
Notifications
You must be signed in to change notification settings - Fork 12.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[AArch64][Clang] Define __ARM_NEON_SVE_BRIDGE unconditionally (#118272)
The meaning of `__ARM_NEON_SVE_BRIDGE` was changed here: ARM-software/acle#362 Such that it should be defined to `1` if the `arm_neon_sve_bridge.h` header file is available, which is the case for Clang.
- Loading branch information
1 parent
04b26f0
commit 0adab6b
Showing
4 changed files
with
20 additions
and
3 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
15 changes: 15 additions & 0 deletions
15
clang/test/Sema/aarch64-sve-intrinsics/acle_neon_sve_bridge.cpp
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,15 @@ | ||
// RUN: %clang_cc1 -triple aarch64-none-linux-gnu -verify -emit-llvm -o - %s | ||
// REQUIRES: aarch64-registered-target | ||
|
||
// Test that we can use __ARM_NEON_SVE_BRIDGE to guard to inclusion of arm_neon_sve_bridge.h, | ||
// and use the associated intrinsics via a target() attribute. | ||
|
||
// expected-no-diagnostics | ||
|
||
#ifdef __ARM_NEON_SVE_BRIDGE | ||
#include <arm_neon_sve_bridge.h> | ||
#endif | ||
|
||
uint32x4_t __attribute__((target("+sve"))) foo(svuint32_t a) { | ||
return svget_neonq_u32(a); | ||
} |