Supporting gcc's instrinsic builtins would be a major project to add to dmd. If your project needs them, pragmatically you'll need to use gdc/ldc.
Comment #4 by dlang-bot — 2023-11-06T18:49:33Z
@WalterBright created dlang/dmd pull request #15779 "Issue 24124 - ImportC: gcc simd intrinsics not supported by dmd" mentioning this issue:
- Issue 24124 - ImportC: gcc simd intrinsics not supported by dmd
https://github.com/dlang/dmd/pull/15779
Comment #5 by bugzilla — 2023-11-06T18:54:53Z
BTW, dmd supports all the x86 SIMD instructions in the inline assembler.
Comment #6 by maxhaton — 2023-11-06T23:57:48Z
Guillaume has implemented most of the library of intel intrinsics in his library if they are genuinely required (I have been saying this should be pinched for druntime for a while alas he isn't keen)
Comment #7 by bugzilla — 2023-11-07T03:23:43Z
(In reply to mhh from comment #6)
> Guillaume has implemented most of the library of intel intrinsics in his
> library if they are genuinely required (I have been saying this should be
> pinched for druntime for a while alas he isn't keen)
Can you link to it here, please?
Comment #8 by bugzilla — 2023-11-07T03:27:27Z
1. dmd does not support gcc simd intrinsics, and is not likely to
2. the library in question has a #define for disabling use of those intrinsics, and it's a 3rd party library
Hence, I'm going to resolve this as WONTFIX.
Comment #9 by schveiguy — 2023-11-07T13:58:22Z
In general, I agree with this result.
The unfortunate reality is, many C libraries are going to use the definitions from the local c preprocessor (which is not related to DMD) to make decisions, which means that code simply won't compile with DMD.
The only real solution would be for DMD to require a specific set of C headers and C preprocessor that goes with it, and code to that.
ImportC with system headers might be a LDC/GDC-only thing.