opus icon indicating copy to clipboard operation
opus copied to clipboard

use -mavx clang style options to enable SIMD for clang-cl

Open wangyoucao577 opened this issue 3 years ago • 4 comments

  • Only use /arch:AVX MSVC style options to enable SIMD when strictly MSVC cl;
  • Use -mavx gcc/clang style options to enable SIMD when possible, for example clang-cl installed in MSVC;
  • Enable C11 for clang-cl;
  • Enable cpuinfo for clang-cl;

Closes https://github.com/xiph/opus/issues/256

wangyoucao577 avatar Jul 23 '22 02:07 wangyoucao577

@wangyoucao577 can you add the same check for all other compiler flags regarding clang-cl frontend. (fast-math etc)

xnorpx avatar Jul 23 '22 05:07 xnorpx

@wangyoucao577 can you add the same check for all other compiler flags regarding clang-cl frontend. (fast-math etc)

I checked all MSVC related options in current cmake, unfortunately -ffast-math can't work on clang-cl, it must be /fp:fast. Supported options(c11, cpuinfo) has been updated.

wangyoucao577 avatar Jul 23 '22 12:07 wangyoucao577

What's the status of this PR?

jmvalin avatar Dec 04 '23 05:12 jmvalin

Is it the correct fix to enable avx everywhere? If you do that then it'll allow the compiler to use avx regardless of the intrinsic right?

abique avatar Feb 13 '24 18:02 abique

Master branch is deleted and all pr's against master is closed. If this change is still relevant please reopen and repoint your PR to main branch.

xnorpx avatar Mar 19 '24 02:03 xnorpx