Skip to content
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

div/mul by 1 not optimized away #115

Closed
lizelive opened this issue Oct 28, 2021 · 3 comments
Closed

div/mul by 1 not optimized away #115

lizelive opened this issue Oct 28, 2021 · 3 comments
Labels
enhancement New feature or request

Comments

@lizelive
Copy link

lizelive commented Oct 28, 2021

for example
math_mod(a, 1)
a-a/1/1000*1000*1
instead of a-a/1000*1000

@dbaumgarten
Copy link
Owner

dbaumgarten commented Oct 28, 2021

This could also be easily expanded to cover multiplication by 0 and addition of 0.
Should be pretty easy to do.

@dbaumgarten dbaumgarten added the enhancement New feature or request label Oct 28, 2021
@dbaumgarten dbaumgarten added the waiting for release Has been implemented but not yet published label Oct 29, 2021
@dbaumgarten
Copy link
Owner

So, I just pushed some changes to develop.
Using that new version, you example compiles exactly like you would expect it to.

@dbaumgarten
Copy link
Owner

Released as part of v0.1.11

@dbaumgarten dbaumgarten removed the waiting for release Has been implemented but not yet published label Nov 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants