-
Notifications
You must be signed in to change notification settings - Fork 14.3k
DAG: Assert fcmp uno runtime calls are boolean values #142898
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 |
---|---|---|
|
@@ -429,8 +429,16 @@ void TargetLowering::softenSetCCOperands(SelectionDAG &DAG, EVT VT, | |
// Update Chain. | ||
Chain = Call.second; | ||
} else { | ||
assert(CCCode == (ShouldInvertCC ? ISD::SETEQ : ISD::SETNE) && | ||
"unordered call should be simple boolean"); | ||
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. You're adding an assertion that CCCode should be SETEQ or SETNE... then you're changing the condition code for RTLIB::UO_F32 to SETCC_INVALID, which then goes through here? I must be missing something... 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. Oh, wait, I see, we don't call setCmpLibcallCC in that case, so the ARMISelLowering change is just a no-op. 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. Yes, it was setting the default value so this never did anything |
||
|
||
EVT SetCCVT = | ||
getSetCCResultType(DAG.getDataLayout(), *DAG.getContext(), RetVT); | ||
if (getBooleanContents(RetVT) == ZeroOrOneBooleanContent) { | ||
NewLHS = DAG.getNode(ISD::AssertZext, dl, RetVT, Call.first, | ||
DAG.getValueType(MVT::i1)); | ||
} | ||
|
||
SDValue Tmp = DAG.getSetCC(dl, SetCCVT, NewLHS, NewRHS, CCCode); | ||
auto Call2 = makeLibCall(DAG, LC2, RetVT, Ops, CallOptions, dl, Chain); | ||
CCCode = getCmpLibcallCC(LC2); | ||
|
Uh oh!
There was an error while loading. Please reload this page.