Bug 389700

Summary: vex amd64->IR: unhandled instruction bytes: 0xC4 0xE3 0x7D 0x1D 0xED 0x0 0xC5 0xF9 0xC5 0xF5 (F16C)
Product: [Developer tools] valgrind Reporter: Sam Xi <sxvp12345>
Component: vexAssignee: Julian Seward <jseward>
Status: REPORTED ---    
Severity: crash CC: mark, pjfloyd
Priority: NOR    
Version First Reported In: 3.13.0   
Target Milestone: ---   
Platform: unspecified   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description Sam Xi 2018-01-31 16:00:23 UTC
Valgrind 3.13.0, built from source on Ubuntu 16.04.

Seems similar to bug 339596, except this is from packed signed to packed half precision (the other way around).

vex amd64->IR: unhandled instruction bytes: 0xC4 0xE3 0x7D 0x1D 0xED 0x0 0xC5 0xF9 0xC5 0xF5
vex amd64->IR:   REX=0 REX.W=0 REX.R=0 REX.X=0 REX.B=0
vex amd64->IR:   VEX=1 VEX.L=1 VEX.nVVVV=0x0 ESC=0F3A
vex amd64->IR:   PFX.66=1 PFX.F2=0 PFX.F3=0
==4231== valgrind: Unrecognised instruction at address 0x42a3c5.
==4231==    at 0x42A3C5: _mm256_cvtps_ph (f16cintrin.h:75)
==4231==    by 0x42A3C5: pack_weights_vec8_f16(float*, int*, int*, int, _dims_t*) (compression.c:56)
==4231==    by 0x402FE6: main (test_smiv_csr.cpp:31)
==4231== Your program just tried to execute an instruction that Valgrind
==4231== did not recognise.  There are two possible reasons for this.
==4231== 1. Your program has a bug and erroneously jumped to a non-code
==4231==    location.  If you are running Memcheck and you just saw a
==4231==    warning about a bad jump, it's probably your program's fault.
==4231== 2. The instruction is legitimate but Valgrind doesn't handle it,
==4231==    i.e. it's Valgrind's fault.  If you think this is the case or
==4231==    you are not sure, please let us know and we'll try to fix it.
==4231== Either way, Valgrind will now raise a SIGILL signal which will
==4231== probably kill your program.
==4231==
==4231== Process terminating with default action of signal 4 (SIGILL)
==4231==  Illegal opcode at address 0x42A3C5
==4231==    at 0x42A3C5: _mm256_cvtps_ph (f16cintrin.h:75)
==4231==    by 0x42A3C5: pack_weights_vec8_f16(float*, int*, int*, int, _dims_t*) (compression.c:56)
==4231==    by 0x402FE6: main (test_smiv_csr.cpp:31)
Comment 1 Sam Xi 2018-01-31 16:03:35 UTC
Oops, miscopied similar bug number - it would be 356715.
Comment 2 Paul Floyd 2025-09-09 19:28:52 UTC
I think that this is FP16C which we don't support
https://www.felixcloutier.com/x86/vcvtps2ph
(otherwise it is AVX512 which we don't support either).