-
-
Notifications
You must be signed in to change notification settings - Fork 265
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix gccbuiltins_*.di generation for LLVM >= 15. (#4350)
Fix gccbuiltins_*.di generation for LLVM >= 15. Adds simple testcase to test that generation of intrinsics import files is indeed happening. This uncovered missing vector type aliases for MIPS, fixed that too. Resolves issue #4347
- Loading branch information
1 parent
c5cf086
commit 2153c76
Showing
3 changed files
with
51 additions
and
2 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
// Very basic test to check that instrinsics include file is made correctly. | ||
// Related to https://github.com/ldc-developers/ldc/issues/4347 | ||
|
||
// Just do SemA, no codegen, such that it works on all CI systems. | ||
// RUN: %ldc -o- %s | ||
|
||
import core.simd; | ||
static import ldc.gccbuiltins_aarch64; | ||
static import ldc.gccbuiltins_arm; | ||
static import ldc.gccbuiltins_mips; | ||
static import ldc.gccbuiltins_nvvm; | ||
static import ldc.gccbuiltins_ppc; | ||
static import ldc.gccbuiltins_x86; | ||
|
||
short2 s2; | ||
short8 s8; | ||
double2 d2; | ||
void* ptr; | ||
|
||
void main() | ||
{ | ||
ldc.gccbuiltins_aarch64.__builtin_arm_isb(1); | ||
|
||
ldc.gccbuiltins_arm.__builtin_arm_dmb(2); | ||
|
||
short2 mips = ldc.gccbuiltins_mips.__builtin_mips_addq_s_ph(s2, s2); | ||
|
||
double nvvm = ldc.gccbuiltins_nvvm.__nvvm_fma_rz_d(1.0, 2.0, 3.0); | ||
|
||
short8 ppc8 = ldc.gccbuiltins_ppc.__builtin_altivec_crypto_vpmsumh(s8, s8); | ||
|
||
ldc.gccbuiltins_x86.__builtin_ia32_lfence(); | ||
ldc.gccbuiltins_x86.__builtin_ia32_umonitor(ptr); | ||
double2 x86 = ldc.gccbuiltins_x86.__builtin_ia32_maxpd(d2, d2); | ||
} |
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