-
Notifications
You must be signed in to change notification settings - Fork 15.5k
[Associativity]: Make FMul associative operator #113269
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 all commits
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 |
|---|---|---|
|
|
@@ -562,12 +562,13 @@ loop: | |
| define void @fmul_noassoc(float %c1, float %c2) { | ||
|
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
| ; CHECK-LABEL: @fmul_noassoc( | ||
| ; CHECK-NEXT: entry: | ||
| ; CHECK-NEXT: [[INVARIANT_OP:%.*]] = fmul nsz float [[C1:%.*]], [[C2:%.*]] | ||
| ; CHECK-NEXT: br label [[LOOP:%.*]] | ||
| ; CHECK: loop: | ||
| ; CHECK-NEXT: [[INDEX:%.*]] = phi float [ 0.000000e+00, [[ENTRY:%.*]] ], [ [[INDEX_NEXT:%.*]], [[LOOP]] ] | ||
| ; CHECK-NEXT: [[STEP_ADD:%.*]] = fmul reassoc nsz float [[INDEX]], [[C1:%.*]] | ||
| ; CHECK-NEXT: [[STEP_ADD:%.*]] = fmul reassoc nsz float [[INDEX]], [[C1]] | ||
| ; CHECK-NEXT: call void @use(float [[STEP_ADD]]) | ||
| ; CHECK-NEXT: [[INDEX_NEXT]] = fmul nsz float [[STEP_ADD]], [[C2:%.*]] | ||
| ; CHECK-NEXT: [[INDEX_NEXT]] = fmul nsz float [[INDEX]], [[INVARIANT_OP]] | ||
| ; CHECK-NEXT: br label [[LOOP]] | ||
| ; | ||
| entry: | ||
|
|
||
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.
I think this should not be folded but I think the problem here is not related to the associativity, but related to the handling of fast flags ?