Skip to content

Fix asserts that were always true due to a missed neg. #44095

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

Merged
merged 2 commits into from
Nov 3, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/coreclr/src/gc/gchandletable.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ IGCHandleStore* GCHandleManager::CreateHandleStore()

return store;
#else
assert("CreateHandleStore is not implemented when FEATURE_REDHAWK is defined!");
assert(!"CreateHandleStore is not implemented when FEATURE_REDHAWK is defined!");
return nullptr;
#endif
}
Expand Down
24 changes: 22 additions & 2 deletions src/coreclr/src/jit/lowerxarch.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5464,9 +5464,29 @@ void Lowering::ContainCheckHWIntrinsic(GenTreeHWIntrinsic* node)
break;
}

case NI_SSE2_ShiftLeftLogical128BitLane:
case NI_SSE2_ShiftRightLogical128BitLane:
case NI_AVX2_ShiftLeftLogical128BitLane:
case NI_AVX2_ShiftRightLogical128BitLane:
{
#if DEBUG
// These intrinsics should have been marked contained by the general-purpose handling earlier in the method.
Copy link
Member

Choose a reason for hiding this comment

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

This is causing CI to fail in the formatting job. It failed on this PR as well.

Copy link
Member

Choose a reason for hiding this comment

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

Looks like you fixed this in #44197, 👍


GenTree* lastOp = HWIntrinsicInfo::lookupLastOp(node);
assert(lastOp != nullptr);

if (HWIntrinsicInfo::isImmOp(intrinsicId, lastOp) && lastOp->IsCnsIntOrI())
{
assert(lastOp->isContained());
}
#endif

break;
}

default:
{
assert("Unhandled containment for binary hardware intrinsic with immediate operand");
assert(!"Unhandled containment for binary hardware intrinsic with immediate operand");
break;
}
}
Expand Down Expand Up @@ -5643,7 +5663,7 @@ void Lowering::ContainCheckHWIntrinsic(GenTreeHWIntrinsic* node)

default:
{
assert("Unhandled containment for ternary hardware intrinsic with immediate operand");
assert(!"Unhandled containment for ternary hardware intrinsic with immediate operand");
break;
}
}
Expand Down