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

[X86]RMW instrs not handled in pre-RA-sched=fast #67281

Closed
wants to merge 1 commit into from

Conversation

XinWang10
Copy link
Contributor

@XinWang10 XinWang10 commented Sep 25, 2023

Fast scheduler added in 2008 patch and this fix in ScheduleDAGRRList.cpp started at 2011 patch. So I guess this could be missed.

Comment on lines +234 to +238
// unfolding an x86 RMW operation results in store, dec, load which
// can't be handled here so quit
if (NewNodes.size() == 3)
return nullptr;

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this put in X86 specific function? Otherwise, it may affect other targets.

Copy link
Contributor Author

@XinWang10 XinWang10 Sep 25, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

patch in ScheduleDAGRRList.cpp was fixed in this way, then maybe need to add 1 function to TargetInstrInfo if that.
But I may raise another PR which could disable unfold for X86 RMW instrs, I just find it could also fix it, if that patch could be landed then I would abandon this one otherwise we may add a function to TargetInstrInfo.cpp if we want to use specific function.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why can't add it in unfoldMemoryOperand if it is required in each time?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If that then it's same to my solution which disable unfold for RMW, and we need to clarify if RMW would not be used every where or just here.(Although this signature for unfoldMemoryOperand just used here, I don't know if it would be used in the future.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't understand this PR, either. Shouldn't #67288 be enough?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, I raised this first, then I find it can also be fixed by #67288. If that patch landed then this patch should be abandoned.

@XinWang10
Copy link
Contributor Author

Closed due to #67288 landed.

@XinWang10 XinWang10 closed this Sep 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backend:X86 llvm:SelectionDAG SelectionDAGISel as well
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants