Skip to content

Fix #23802 - don't fuse conversion ops on common subexpressions - #23815

Merged
thewilsonator merged 1 commit into
dlang:masterfrom
limepoutine:issue23802
Sep 9, 2026
Merged

Fix #23802 - don't fuse conversion ops on common subexpressions#23815
thewilsonator merged 1 commit into
dlang:masterfrom
limepoutine:issue23802

Conversation

@limepoutine

Copy link
Copy Markdown
Contributor

If a floating point conversion is a common subexpression, avoid encoding precision in the ModR/M byte, but instead do a full load. Otherwise global CSE will have a hard time finding the value in registers.

@WalterBright Please review as this might not be an optimal fix.

@github-actions

github-actions Bot commented Sep 8, 2026

Copy link
Copy Markdown

DMD perf check

Metric Base PR Δ
compile Phobos codegen (instr) 1,472.4 M 1,475.4 M +0.200%
dmd binary size (stripped) 6.87 MB 6.88 MB +0.11%
All measurements
Metric Base PR Δ
compile hello.d (instr) 213.3 M 213.3 M +0.007%
compile hello.d -O -release (instr) 231.6 M 231.6 M +0.010%
compile Phobos (instr) 5,120.6 M 5,123.4 M +0.056%
compile Phobos codegen (instr) 1,472.4 M 1,475.4 M +0.200%
compile vibe.d (instr) 15,112.0 M 15,112.3 M +0.002%
dmd binary size (stripped) 6.87 MB 6.88 MB +0.11%
hello binary size (stripped) 0.72 MB 0.72 MB 0.00%
peak RSS (compile hello.d) 43.16 MB 43.19 MB +0.07%
peak RSS (compile Phobos) 620.4 MB 617.2 MB -0.51%
peak RSS (compile vibe.d) 1918 MB 1917 MB -0.06%
compile dmd itself (wall) 12.0 s 12.1 s +0.37%
compile hello.d (wall) 62.7 ms 62.7 ms +0.08%
compile Phobos (wall) 1,544 ms 1,548 ms +0.24%

c97396d vs merge-base 74623e4 · about these metrics

@thewilsonator
thewilsonator merged commit 70145d6 into dlang:master Sep 9, 2026
56 of 58 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants