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

[mono][llvm] Support exception filters #54185

Open
Tracked by #63404
imhameed opened this issue Jun 14, 2021 · 5 comments
Open
Tracked by #63404

[mono][llvm] Support exception filters #54185

imhameed opened this issue Jun 14, 2021 · 5 comments
Assignees
Labels
area-Codegen-LLVM-mono runtime-mono specific to the Mono runtime
Milestone

Comments

@imhameed
Copy link
Contributor

imhameed commented Jun 14, 2021

Seen in https://github.com/dotnet/runtime/blob/6474c725025a8b29b4265c4d9485018982ee6b16/src/tests/JIT/HardwareIntrinsics/X86/Sse42.X64/Crc32.cs. Makes Mono bail out of translating to LLVM with "LLVM failed for 'Program.Main': non-finally/catch/fault clause."

The resulting test then ends up with weird semi-consistent codegen which causes it to print:

Intrinsic Sse42.X64.Crc32 is called on non-supported hardware.
Sse42.IsSupported False
Environment.Is64BitProcess True
Intrinsic Sse42.X64.Crc32 is called via reflection on non-supported hardware.
Sse42.IsSupported False
Environment.Is64BitProcess True

but still yield 0 (instead of 100) as an exit code.

Random notes:

https://llvm.org/docs/LangRef.html#llvm-localescape-and-llvm-localrecover-intrinsics
https://github.com/dotnet/llvm-project/blob/release/11.x/llvm/test/CodeGen/X86/wineh-coreclr.ll

One difficulty with llvm.localaddress and llvm.localrecover is that they are currently only supported on x86, x86-64, and aarch64. But it doesn't look like it'd be too hard to add support for other platforms. (But I have no idea how involved this would be for WASM)

Also enable JIT/HardwareIntrinsics/X86/Sse42.X64/Crc32_{r,ro} test with the fix

@dotnet-issue-labeler dotnet-issue-labeler bot added area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI untriaged New issue has not been triaged by the area owner labels Jun 14, 2021
@imhameed imhameed added area-Codegen-LLVM-mono runtime-mono specific to the Mono runtime and removed area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI untriaged New issue has not been triaged by the area owner labels Jun 14, 2021
@SamMonoRT SamMonoRT added this to the 6.0.0 milestone Jun 15, 2021
@SamMonoRT
Copy link
Member

@BrzVlad - any overlap between work done on exception filters from issues in your queue ?

@BrzVlad
Copy link
Member

BrzVlad commented Jun 16, 2021

Supporting exception filters with llvm requires some research, unrelated with any other work. We never supported exception filters with llvm. Doesn't seem feasible for .NET 6.0

@SamMonoRT SamMonoRT modified the milestones: 6.0.0, 7.0.0 Jun 16, 2021
@SamMonoRT
Copy link
Member

Moving this to Future milestone.

@kasperk81
Copy link
Contributor

@jandupej #54176 is closed but referenced in

<ExcludeList Include = "$(XunitTestBinBase)/JIT/HardwareIntrinsics/X86/Sse2.X64/StoreNonTemporal_r/**">
<Issue>https://github.com/dotnet/runtime/issues/54176</Issue>
</ExcludeList>
<ExcludeList Include = "$(XunitTestBinBase)/JIT/HardwareIntrinsics/X86/Sse2.X64/StoreNonTemporal_ro/**">
<Issue>https://github.com/dotnet/runtime/issues/54176</Issue>
</ExcludeList>
and
[ActiveIssue("https://github.com/dotnet/runtime/issues/54176", TestRuntimes.Mono)]
will it be fixed somewhat differently? otherwise replace the link with reason strings similar to other unsupported tests: non-temporal store intrinsics are not supported on this platform.

@jandupej
Copy link
Member

jandupej commented Oct 9, 2023

@kasperk81 The reason for disabling the test you indicate is strange. I created an issue where enabling these tests can be tracked: #93202

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-Codegen-LLVM-mono runtime-mono specific to the Mono runtime
Projects
None yet
Development

No branches or pull requests

5 participants