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 ITE Simplification Transform #112

Merged
merged 1 commit into from
Nov 27, 2024
Merged

Add ITE Simplification Transform #112

merged 1 commit into from
Nov 27, 2024

Conversation

ncough
Copy link
Collaborator

@ncough ncough commented Nov 27, 2024

Reduce flag setting pattern in CCMP instruction. Should make the task of branch condition simplification easier for BASIL.

Goes from:

if cond then
  X1 := E1
  ...
  XN := EN
else
  X1 := F1
  ...
  XN := FN

To:

const ITESimp_0 := cond
X1 := (ITESimp_0 & E1) | (!ITESimp_0 & F1)
...
XN := (ITESimp_0 & EN) | (!ITESimp_0 & FN)

Reduce flag setting pattern in CCMP instruction, from:

if cond then
  X1 := E1
  ...
  XN := EN
else
  X1 := F1
  ...
  XN := FN

to:

const ITESimp_0 := cond
X1 := (ITESimp_0 & E1) | (!ITESimp_0 & F1)
...
XN := (ITESimp_0 & EN) | (!ITESimp_0 & FN)
@ncough ncough merged commit b05a4bf into partial_eval Nov 27, 2024
4 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.

1 participant