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

AArch64, LLVM 11 ERROR: Cannot select some types #7138

Closed
data-man opened this issue Nov 17, 2020 · 4 comments
Closed

AArch64, LLVM 11 ERROR: Cannot select some types #7138

data-man opened this issue Nov 17, 2020 · 4 comments
Labels
arch-aarch64 64-bit ARM backend-llvm The LLVM backend outputs an LLVM IR Module. bug Observed behavior contradicts documented or intended behavior upstream An issue with a third party project that Zig uses.
Milestone

Comments

@data-man
Copy link
Contributor

Discovered in #6928.

Extracted tests from test/stage1/behavior/vector.zig:

doTheTestReduce(.Min, [4]i64{ 1234567, -386, 0, 3 }, @as(i64, -386));
doTheTestReduce(.Min, [4]u64{ 99, 9999, 9, 99999 }, @as(u64, 9));

doTheTestReduce(.Max, [4]i64{ 1234567, -386, 0, 3 }, @as(i64, 1234567));
doTheTestReduce(.Max, [4]u64{ 99, 9999, 9, 99999 }, @as(u64, 99999));

doTheTestReduce(.Min, [4]f16{ -1.9, 5.1, f16_nan, 100.0 }, f16_nan);
doTheTestReduce(.Min, [4]f32{ -1.9, 5.1, f32_nan, 100.0 }, f32_nan);
doTheTestReduce(.Min, [4]f64{ -1.9, 5.1, f64_nan, 100.0 }, f64_nan);

doTheTestReduce(.Max, [4]f16{ -1.9, 5.1, f16_nan, 100.0 }, f16_nan);
doTheTestReduce(.Max, [4]f32{ -1.9, 5.1, f32_nan, 100.0 }, f32_nan);
doTheTestReduce(.Max, [4]f64{ -1.9, 5.1, f64_nan, 100.0 }, f64_nan);

How to test:zig test -target aarch64-native vector.zig

@LemonBoy's #6928 (comment):

Already fixed in LLVM master, no idea what commit fixed it though.

@Vexu Vexu added arch-aarch64 64-bit ARM bug Observed behavior contradicts documented or intended behavior upstream An issue with a third party project that Zig uses. labels Nov 17, 2020
@Vexu Vexu added this to the 0.8.0 milestone Nov 17, 2020
@kubkon
Copy link
Member

kubkon commented Nov 17, 2020

@data-man have you submitted a bug report upstream btw? If not, would you mind doing it and pasting a link here? I think it's quite critical to do these ASAP especially if they pertain aarch64 - due to Apple making a move to Apple Silicon, we can expect a lot more aarch64 development happening over at LLVM in the near future, so it's good to put that on their radar.

@data-man
Copy link
Contributor Author

@kubkon

have you submitted a bug report upstream btw?

No.

If not, would you mind doing it and pasting a link here?

Sorry, I'm not registered on the LLVM's bugzilla and I don't want.

it's good to put that on their radar.

But:

Already fixed in LLVM master, no idea what commit fixed it though.

?

@andrewrk
Copy link
Member

That's great it's already fixed, so we will leave this issue to track the disabled test case, and then when LLVM 12 comes out we can re-enable it and close this issue.

@andrewrk
Copy link
Member

andrewrk commented Nov 20, 2020

Note this comment: https://github.com/ziglang/zig/pull/6928/files#r526040373

This is a different problem than the one above.
LLVM's handling of nans across different arches improved a lot after the 12 release.

Some of the disabled code marked with 7138 might be a separate issue.

@andrewrk andrewrk modified the milestones: 0.8.0, 0.8.1 Jun 4, 2021
@andrewrk andrewrk modified the milestones: 0.8.1, 0.9.1 Aug 31, 2021
@andrewrk andrewrk modified the milestones: 0.9.1, 0.9.0, 0.10.0 Nov 20, 2021
@andrewrk andrewrk added the backend-llvm The LLVM backend outputs an LLVM IR Module. label Apr 16, 2022
@andrewrk andrewrk modified the milestones: 0.10.0, 0.11.0 Apr 16, 2022
@andrewrk andrewrk modified the milestones: 0.11.0, 0.12.0 Jun 19, 2023
@andrewrk andrewrk modified the milestones: 0.14.0, unplanned Aug 13, 2024
RetroDev256 pushed a commit to RetroDev256/zig that referenced this issue Sep 8, 2024
DivergentClouds pushed a commit to DivergentClouds/zig that referenced this issue Sep 24, 2024
@alexrp alexrp modified the milestones: unplanned, 0.14.0 Oct 3, 2024
richerfu pushed a commit to richerfu/zig that referenced this issue Oct 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
arch-aarch64 64-bit ARM backend-llvm The LLVM backend outputs an LLVM IR Module. bug Observed behavior contradicts documented or intended behavior upstream An issue with a third party project that Zig uses.
Projects
None yet
Development

No branches or pull requests

5 participants