On Tuesday, 22 November 2016 at 19:29:30 UTC, tsbockman wrote:
On Tuesday, 22 November 2016 at 19:27:11 UTC, Ilya Yaroshenko
wrote:
On Tuesday, 22 November 2016 at 18:57:59 UTC, tsbockman wrote:
Your test fails because you aren't actually using
`core.bitop`. Intrinsics are detected based on fully
qualified names. As soon as you copy `bsf()` and `bsr()`
outside of `core.bitop`, the FQN changes and they're not
intrinsics anymore.
Does DMD overrides bodies for bsf and bsr? It would be
surprised to me.
That's how (almost) ALL of the intrinsics in `core.bitop` and
`core.math` are supposed to work. If it's not overriding the
bodies, that's a bug.
DMD can recognise code patterns and replace them with hardware
functions. I never seen that it can replace bodies. Why do you
think it can? Have you disassembler DMD the code with your PR?