Skip to content
This repository was archived by the owner on Jan 23, 2023. It is now read-only.

Fix HW intrinsic containment bugs#23558

Merged
CarolEidt merged 3 commits intodotnet:masterfrom
CarolEidt:Fix23534
Mar 29, 2019
Merged

Fix HW intrinsic containment bugs#23558
CarolEidt merged 3 commits intodotnet:masterfrom
CarolEidt:Fix23534

Conversation

@CarolEidt
Copy link

For the Fma case (#23430), fix the handling of contained 3-operand HW intrinsic nodes.
For the Bmi case (#23534), fix a bad assert placement, and re-enable the Bmi tests.

Fix #23530
Fix #23534

For the Fma case (dotnet#23430), fix the handling of contained 3-operand HW intrinsic nodes.
For the Bmi case (#23534), fix a bad assert placement, and re-enable the Bmi tests.

Fix #23530
Fix #23534
@tannergooding
Copy link
Member

Just as an FYI, @jkotas logged another bug for MultiplyNoFlags and resolved it as a dupe of 23534: https://github.com/dotnet/coreclr/issues/23546

regSet.tmpRlsTemp(tmpDsc);
}
else if (op3->OperIsHWIntrinsic())
else if (op3->isIndir() || op3->OperIsHWIntrinsic())
Copy link
Member

Choose a reason for hiding this comment

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

Are similar fixes needed for all the other genHWIntrinsic_ code? Such as:

else if (op1->OperIsHWIntrinsic())

Copy link
Author

Choose a reason for hiding this comment

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

I suspect so. However, I will file a separate issue that includes extending the testing to include more containment cases.

Copy link
Member

Choose a reason for hiding this comment

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

If it is just this same thing on all of them, I can address that and you can feel free to assign the issue to me.

Copy link
Author

Choose a reason for hiding this comment

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

Right - it would be just the same, but I don't want to introduce the code without a test to verify it (plus I thought it would be prudent to do it separately, to keep this focused on fixing the existing failures).

{
return -1;
float result = fmaTest();
if (Math.Abs(result - 5.0F) > System.Single.Epsilon)
Copy link
Member

Choose a reason for hiding this comment

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

I would say we can compare this against Math.FusedMultiplyAdd now; but that will get accelerated if Fma.IsSupported returns true

Copy link
Author

Choose a reason for hiding this comment

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

I'd just as soon be explicit here

Copy link
Member

Choose a reason for hiding this comment

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

If you are wanting to be explicit, then this result should be deterministic and you shouldn't need anything more than result != 5.0f.

If this isn't deterministic, then we have other problems 😄

@CarolEidt
Copy link
Author

@tannergooding @dotnet/jit-contrib PTAL

@CarolEidt
Copy link
Author

@dotnet-bot test Windows_NT x64 min_opt ryujit CoreCLR Perf Tests Correctness

@CarolEidt CarolEidt merged commit 1df87c7 into dotnet:master Mar 29, 2019
<ExcludeList Include="$(XunitTestBinBase)/JIT/HardwareIntrinsics/X86/Regression/GitHub_21899/**">
<Issue>23534</Issue>
</ExcludeList>
<ExcludeList Include="$(XunitTestBinBase)/JIT/Methodical/flowgraph/dev10_bug679955/volatileLocal1/*">

Choose a reason for hiding this comment

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

You deleted the exclusion for the test that you have not fixed. #23545 is still open.

Copy link
Author

Choose a reason for hiding this comment

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

Yes, bad/mindless merge. I've pushed a PR to re-exclude it.

@CarolEidt CarolEidt deleted the Fix23534 branch March 30, 2019 16:16
buyaa-n pushed a commit to buyaa-n/coreclr that referenced this pull request Apr 1, 2019
* Fix HW intrinsic containment bugs

For the Fma case (dotnet#23430), fix the handling of contained 3-operand HW intrinsic nodes.
For the Bmi case (#23534), fix a bad assert placement, and re-enable the Bmi tests.

Fix #23530
Fix #23534

* Add guard for Fma test
picenka21 pushed a commit to picenka21/runtime that referenced this pull request Feb 18, 2022
* Fix HW intrinsic containment bugs

For the Fma case (dotnet/coreclr#23430), fix the handling of contained 3-operand HW intrinsic nodes.
For the Bmi case (dotnet/coreclr#23534), fix a bad assert placement, and re-enable the Bmi tests.

Fix dotnet/coreclr#23530
Fix dotnet/coreclr#23534

* Add guard for Fma test


Commit migrated from dotnet/coreclr@1df87c7
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

new failures in JIT.HardwareIntrinsics JIT HWIntrinsics: Bad codegen with contained loads

3 participants