Skip to content

Instantly share code, notes, and snippets.

@malfet
Last active September 12, 2020 00:25
Show Gist options
  • Select an option

  • Save malfet/ccb6de5b16101c698e17f52bdf1a1f73 to your computer and use it in GitHub Desktop.

Select an option

Save malfet/ccb6de5b16101c698e17f52bdf1a1f73 to your computer and use it in GitHub Desktop.
GCC masm=intel bug
// gcc -c -Os -mavx512f -masm=intel
#include <immintrin.h>
float foo(float* con) {
__mmask16 msk = 0x00ff;
__m512 a = _mm512_maskz_loadu_ps(msk, con);
__m512 b = _mm512_set1_ps(con[1]);
__m512 c = _mm512_mul_ps(a,b);
return ((float *)&c)[0];
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment