JonChesterfield wrote: Well it's not pretty, but spirv64-amd-amdhsa sets both __AMDGPU__ and __SPIRV64__ macros. Added a commit with an example that dispatches to amdgpu intrinsics on the happy path and preprocessor error otherwise.
If you let that get to the spirv backend it falls over with `Intrinsic selection not implemented` but you can have IR with the right amdgpu intrinsics in it. https://github.com/llvm/llvm-project/pull/131164 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits