Skip to content

Conversation

@ltratt
Copy link
Contributor

@ltratt ltratt commented Dec 28, 2025

After fixing a formatting mistake with comments (mea culpa!), the main point of this PR is to slightly extend the memcpy optimisation and change the reasoning given (8a9a8d5).

I realised recently that my editor sometimes goes wonky and changes
comment width. This commit rewrites all comments in this file to the
most common width (100 chars).
libc's `memcpy` gives `memcpy(x, x, ...)` undefined behaviour, but
LLVM's `memcpy` gives this defined behaviour. The outcome from our
perspective is the same in either case (we can remove the `memcpy`), but
the reason is different.

While here, we can generalise the "equivalence" check to whenever the
SSA variables are the same, even if they're not constant.
@Fidget-Spinner
Copy link
Contributor

Do you want to squash?

@ltratt
Copy link
Contributor Author

ltratt commented Dec 28, 2025

I think these are best left as-is.

@Fidget-Spinner Fidget-Spinner added this pull request to the merge queue Dec 28, 2025
Merged via the queue into ykjit:master with commit c95bdd7 Dec 28, 2025
2 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