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

Add "not" optimization. #165

Merged
merged 1 commit into from Dec 20, 2017

Conversation

@Kailo97
Copy link
Contributor

Kailo97 commented Dec 19, 2017

if (!func())

Gives

not
jzer n

It has to replace to

jnz n
@asherkin

This comment has been minimized.

Copy link
Member

asherkin commented Dec 20, 2017

This lgtm (being a lift from upstream), but I'd like @Fyren or @dvander to give this a once over before merging as they're more familiar with this beast and our changes to it.

@Kailo97

This comment has been minimized.

Copy link
Contributor Author

Kailo97 commented Dec 20, 2017

About this case (probably not generatable)

eq.c.pri 0
not
jzer n1

all still worse

if (!(g_int[0] == 0))

gives

const.pri 2228
load.i
zero.alt
eq
not
jzer 3292
@dvander

This comment has been minimized.

Copy link
Member

dvander commented Dec 20, 2017

This seems reasonable.

@dvander dvander merged commit c7bc519 into alliedmodders:master Dec 20, 2017
2 checks passed
2 checks passed
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
@Kailo97 Kailo97 deleted the Kailo97:patch-1 branch Dec 20, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.