And even C#: https://godbolt.org/z/5WPfT8e5G Does use the &-2 strategy.
Dart also uses and: https://godbolt.org/z/1437df4En
So most of languages compiled to native binaries seem to do it. Languages like Ruby and Python don't seem to optimize this, which is hardly surprising. Ruby has a JIT now, and the JIT might do it.
And I'm not sure what the haskell version does, can someone explain: https://godbolt.org/z/xPP4E1a6h ?