D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 16680 - dmd doesn't use druntime optimized versions of subtraction array operations
Summary: dmd doesn't use druntime optimized versions of subtraction array operations
Status: RESOLVED FIXED
Alias: None
Product: D
Classification: Unclassified
Component: dmd (show other issues)
Version: D2
Hardware: All All
: P1 regression
Assignee: No Owner
URL:
Keywords: pull
Depends on:
Blocks:
 
Reported: 2016-11-11 09:53 UTC by Oleg Gorbunov
Modified: 2017-08-09 10:39 UTC (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description Oleg Gorbunov 2016-11-11 09:53:17 UTC
DMD generates function name for substract array operations that differs from from name in drintime library.

Eg.
a[] = b[] - c[];

DMD version _arraySliceSliceSubSliceAssign_i
drintime    _arraySliceSliceMinSliceAssign_i

I found, that substract operation name was changed in 'arrayop.c' from "Min" to "Sub", see patch https://github.com/dlang/dmd/commit/c5297b8ba310029438dc332152ec173a7387fead (22 Jun 2013).

This new name migrated to newly written code 'arrayop.d'
Comment 1 Martin Nowak 2016-11-20 22:44:38 UTC
This will be solved by replacing the asm code with templated array ops, also see https://trello.com/c/TNCQ6xBk/85-templated-library-arrayop-implementation-also-fixes-issue-15619-and-issue-16680.
Comment 2 Rainer Schuetze 2017-01-08 18:00:00 UTC
Templated array ops are likely to take a couple of years, so here's a fix for this typo: https://github.com/dlang/dmd/pull/6413
Comment 3 github-bugzilla 2017-01-08 21:57:19 UTC
Commits pushed to master at https://github.com/dlang/dmd

https://github.com/dlang/dmd/commit/8eb8a67e6e4d47244db99e35ad02f42e1de7d253
fix issue 16680: avoid inconsistent usage of Sub and Min

https://github.com/dlang/dmd/commit/c0d93d18a99a2425961a036138afbc9b1c0ddfae
Merge pull request #6413 from rainers/fix16680

fix issue 16680: avoid inconsistent usage of Sub and Min in array operations
Comment 4 github-bugzilla 2017-01-16 23:26:11 UTC
Commits pushed to newCTFE at https://github.com/dlang/dmd

https://github.com/dlang/dmd/commit/8eb8a67e6e4d47244db99e35ad02f42e1de7d253
fix issue 16680: avoid inconsistent usage of Sub and Min

https://github.com/dlang/dmd/commit/c0d93d18a99a2425961a036138afbc9b1c0ddfae
Merge pull request #6413 from rainers/fix16680
Comment 5 github-bugzilla 2017-03-22 12:20:52 UTC
Commits pushed to stable at https://github.com/dlang/dmd

https://github.com/dlang/dmd/commit/8eb8a67e6e4d47244db99e35ad02f42e1de7d253
fix issue 16680: avoid inconsistent usage of Sub and Min

https://github.com/dlang/dmd/commit/c0d93d18a99a2425961a036138afbc9b1c0ddfae
Merge pull request #6413 from rainers/fix16680
Comment 6 github-bugzilla 2017-08-09 10:39:44 UTC
Commit pushed to master at https://github.com/dlang/druntime

https://github.com/dlang/druntime/commit/184435f243b830cf464047deb1b636a8d5b4ed4a
implement templated array ops

- use RPN to encode operand precedence
- fixes Issue 15619, and 16680