mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-08-03 02:27:48 +00:00
464ebc4fe1
These functions can be implemented more efficiently using LLVM intrinsics. That makes them the Go equivalent of functions like __builtin_clz which are also implemented using these LLVM intrinsics. I believe the Go compiler does something very similar: IIRC it converts calls to these functions into optimal instructions for the given architecture. I tested these by running `tinygo test math/bits` after uncommenting the tests that would always fail (the *PanicZero and *PanicOverflow tests).