Post

Replies

Boosts

Views

Activity

Reply to Apple Clang generating incorrect SIMD code
I have tried running it like this to no avail. clang++ -std=c++11 -O3 -ffast-math -mllvm -enable-constraint-elimination=0 \ main.cpp -o out/main Note, I had to chang @Signalsmith 's original makefile from g++ to clang++ to allow me to also test clang 19 as installed by brew. This image should show the difference(s) between Apple Clang 15, 16 and a baseline Clang.
Dec ’24
Reply to Apple Clang generating incorrect SIMD code
To confirm, I can reproduce this on another machine with a different processor and have tested using different compilers. Apple clang 15.0.0 reports no errors clang version 19.1.5 (via llvm via brew install llvm) reports tiny errors as you might expect with relaxed float compliance. Apple clang 16.0.0 is wildly different (imaginary portion have their sign flipped). Would be super nice if Apple could comment on this and what the timeline might be for a fix. Thanks!
Dec ’24