-
Notifications
You must be signed in to change notification settings - Fork 13.6k
[SelectionDAG] Add preliminary plumbing for samesign
flag
#112354
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 |
---|---|---|
|
@@ -3652,6 +3652,10 @@ void SelectionDAGBuilder::visitICmp(const ICmpInst &I) { | |
Op2 = DAG.getPtrExtOrTrunc(Op2, getCurSDLoc(), MemVT); | ||
} | ||
|
||
SDNodeFlags Flags; | ||
Flags.setSameSign(I.hasSameSign()); | ||
SelectionDAG::FlagInserter FlagsInserter(DAG, Flags); | ||
Comment on lines
+3655
to
+3657
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. Will need update after #114061 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. This was committed so can do this 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. We are still free to use FlagInserter, independently of the changes in #114061, this should be fine. |
||
|
||
EVT DestVT = DAG.getTargetLoweringInfo().getValueType(DAG.getDataLayout(), | ||
I.getType()); | ||
setValue(&I, DAG.getSetCC(getCurSDLoc(), DestVT, Op1, Op2, Opcode)); | ||
|
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.
Unrelated typo fix
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 took the minor opportunity to fix the typo within this patch, will undo if you have a strong concern on this.
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.
That was probably me. I vote for fix.