Coder Social home page Coder Social logo

Comments (3)

thrasibule avatar thrasibule commented on May 28, 2024

I've made some progress on this.

  • test passes with clang. The fact that it wasn't trying avx2 was because I was running it in virtuabox, and even though virtualbox lets avx2 flag thought the host, it doesn't let fma and bmi throughwhich are also required.
  • test passes with gcc if I use the -O2 flag instead of -O3. So it must be some over agressive optimization somewhere
  • unfortunately, I've tried to run with -O2 -ftree-loop-vectorize -fversion-loops-for-strides -fipa-cp-clone -fgcse-after-reload -floop-interchange -floop-unroll-and-jam -fpeel-loops -fpredictive-commoning -fsplit-loops -fsplit-paths -ftree-loop-distribution -ftree-partial-pre -ftree-slp-vectorize -funswitch-loops -fvect-cost-model -fvect-cost-model=dynamic which to my understanding should be quivalent to -O3 but the test still passes, so there is something else that I'm missing.

from highwayhash.

jan-wassenberg avatar jan-wassenberg commented on May 28, 2024

Thanks for letting us know and sharing your results. It does sound like a compiler bug, which is unfortunately not uncommon in my experience.

avx2 was because I was running it in virtuabox, and even though virtualbox lets avx2 flag thought the host, it doesn't let fma and bmi throughwhich are also required.

Yes, this is unfortunate. We also ran into that with JPEG XL. There the FMA is helpful but for HighwayHash we could remove those extra flag requirements.

Interesting that -O3 is not the same as its constituent flags (at least as defined at https://gcc.gnu.org/onlinedocs/gcc/Optimize-Options.html - I verified it's the same list). Would you like to report this as a potential a bug to GCC?

from highwayhash.

thrasibule avatar thrasibule commented on May 28, 2024

I've checked that it also works with -O3 -fno-strict-aliasing, but I don't get any aliasing warnings, so it must be something quite subtle. Does it ring a bell? It also works with gcc 9.3. I'm a bit wary to report it to gcc without narrowing down the issue further.

from highwayhash.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.