-
-
Notifications
You must be signed in to change notification settings - Fork 262
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bad codegen for comparison with postfix #4651
Comments
Thx for the report. The problem isn't the icmp after the add (that's fine), but we need to load the lhs eagerly, not using it as lvalue and loading it freshly before the icmp (so after the add + store). |
Unclear what the exact bug is, see this post by @ibuclaw https://forum.dlang.org/post/[email protected] Perhaps |
Yeah as can be seen from the diff in #4656, this wouldn't be doable for all cases anyway, most notably if an operand is a struct or class, since that would require creating temporaries, exactly as Iain wrote in https://forum.dlang.org/post/[email protected]. So I put this on hold for now, as I wouldn't like diverging operand load orders depending on whether it's a primitive or aggregate type. |
@rikkimax Please submit an upstream bug report, to find out what the correct solution is here (e.g. improve the spec). |
ldc fe 2.107 as per run.dlang.org
Note; the icmp is after the add, which it shouldn't be.
Source: https://twitter.com/marcos_don/status/1787629240550150361
The text was updated successfully, but these errors were encountered: