-
Notifications
You must be signed in to change notification settings - Fork 15.2k
[VPlan] Reassociate (x & y) & z -> x & (y & z) #155383
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
Changes from 2 commits
f9f7969
2cd0bb5
94f7b9f
28162b8
f66a940
7661966
7d0e1cb
6a796d0
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -1119,6 +1119,12 @@ static void simplifyRecipe(VPRecipeBase &R, VPTypeAnalysis &TypeInfo) { | |||||
| return; | ||||||
| } | ||||||
|
|
||||||
| // (x & y) & z -> x & (y & z) | ||||||
| if (match(Def, m_LogicalAnd(m_LogicalAnd(m_VPValue(X), m_VPValue(Y)), | ||||||
| m_VPValue(Z)))) | ||||||
| return Def->replaceAllUsesWith( | ||||||
| Builder.createLogicalAnd(X, Builder.createLogicalAnd(X, Y))); | ||||||
|
||||||
| Builder.createLogicalAnd(X, Builder.createLogicalAnd(X, Y))); | |
| Builder.createLogicalAnd(X, Builder.createLogicalAnd(Y, Z))); |
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Argh, yes. Will fix and reevaluate this PR...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed in 7661966. I ran this again on SPEC CPU 2017 for RISC-V and there's still the original codegen improvements from the initial version of this PR where we remove the header mask in more places
Uh oh!
There was an error while loading. Please reload this page.