[Bug 278417] The _cvtsh_ss() intrinsic function generates illegal instructions

From: <bugzilla-noreply_at_freebsd.org>
Date: Wed, 17 Apr 2024 22:02:26 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=278417

--- Comment #4 from Dimitry Andric <dim@FreeBSD.org> ---
(In reply to Yuri Victorovich from comment #2)
> But this should be covered by the CPUTYPE setting.

That seems to be unimplemented at this point. The llvm getHostCPUFeatures()
function has support for detecting the feature from CPUID bits, but it looks
like that is only used for e.g. -march=native.

I don't maintain share/mk/bsd.cpu.mk, but it seems logical to have some support
added there?


> clang should know that this CPU doesn't support such instructions and should emit a generic replacement.

There is a note in f16cintrin.h about this:

/* NOTE: Intel documents the 128-bit versions of these as being in emmintrin.h,
 * but that's because icc can emulate these without f16c using a library call.
 * Since we don't do that let's leave these in f16cintrin.h.
 */

so apparently it is not implemented. I guess you simply have to avoid relying
on these intrinsics if your CPU does not support them.

-- 
You are receiving this mail because:
You are the assignee for the bug.