Bug 19199 – Use core.bitops intrinsics during CTFE

Status
RESOLVED
Resolution
FIXED
Severity
enhancement
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2018-08-27T19:48:44Z
Last change time
2018-09-02T18:48:14Z
Assigned to
No Owner
Creator
Nathan S.

Comments

Comment #0 by n8sh.secondary — 2018-08-27T19:48:44Z
Currently in `dmd.builtin` there are software implementations of `core.bitop` functions within `eval_bsf`, `eval_bsr`, `eval_bswap`, and `eval_popcnt`. With DMD written in D this is unnecessary: they can use `core.bitop`.
Comment #1 by n8sh.secondary — 2018-08-27T19:57:34Z
Comment #2 by github-bugzilla — 2018-09-02T18:48:13Z
Commits pushed to master at https://github.com/dlang/dmd https://github.com/dlang/dmd/commit/d1cccc57dc65fb7038490b61798e2c92fd31901e Fix Issue 19199 - Use core.bitops intrinsics during CTFE dmd.builtin.eval_popcnt had the wrong type: should always be int rather than matching the type of the argument. https://github.com/dlang/dmd/commit/3dab4374fe584301c2cbb75ef69fa9b9a803e3f6 Merge pull request #8627 from n8sh/builtin-bitops-19199 Fix Issue 19199 - Use core.bitops intrinsics during CTFE merged-on-behalf-of: Petar Kirov <[email protected]>