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

llvm 18 regression: crash in "@intFromBool on vector" behavior test #19825

Open
andrewrk opened this issue May 1, 2024 · 0 comments
Open

llvm 18 regression: crash in "@intFromBool on vector" behavior test #19825

andrewrk opened this issue May 1, 2024 · 0 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 os-windows regression It worked in a previous version of Zig, but stopped working. upstream An issue with a third party project that Zig uses.
Milestone

Comments

@andrewrk
Copy link
Member

andrewrk commented May 1, 2024

In the llvm18 branch:

[nix-shell:~/src/zig/build-llvm18]$ stage3/bin/zig test -target aarch64-windows-gnu ../test/behavior.zig LLVM Emit Object... zig: /home/andy/dev/llvm-project-18/llvm/lib/CodeGen/GlobalISel/LegalizerInfo.cpp:199: llvm::LegalizeActionStep llvm::LegalizeRuleSet::apply(const llvm::LegalityQuery&) const: Assertion `mutationIsSane(Rule, Query, Mutation) && "legality mutation invalid for match"' failed.
Aborted (core dumped)

This behavior test is failing:

zig/test/behavior/cast.zig

Lines 2477 to 2495 in 1c9bb6a

test "@intFromBool on vector" {
if (builtin.zig_backend == .stage2_wasm) return error.SkipZigTest; // TODO
if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO
if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO
if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO
if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
const S = struct {
fn doTheTest() !void {
var a: @Vector(3, bool) = .{ false, true, false };
_ = &a;
const b: @Vector(3, u1) = @intFromBool(a);
try expectEqual(@Vector(3, u1){ 0, 1, 0 }, b);
}
};
try S.doTheTest();
try comptime S.doTheTest();
}

Reported upstream at llvm/llvm-project#90698

@andrewrk andrewrk added bug Observed behavior contradicts documented or intended behavior os-windows upstream An issue with a third party project that Zig uses. arch-aarch64 64-bit ARM backend-llvm The LLVM backend outputs an LLVM IR Module. regression It worked in a previous version of Zig, but stopped working. labels May 1, 2024
@andrewrk andrewrk added this to the 0.15.0 milestone May 1, 2024
@andrewrk andrewrk changed the title llvm 18 regression: crash in llvm 18 regression: crash in "@intFromBool on vector" behavior test May 1, 2024
andrewrk added a commit that referenced this issue May 1, 2024
andrewrk added a commit that referenced this issue May 1, 2024
andrewrk added a commit that referenced this issue May 3, 2024
andrewrk added a commit that referenced this issue May 8, 2024
andrewrk added a commit that referenced this issue May 9, 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 os-windows regression It worked in a previous version of Zig, but stopped working. upstream An issue with a third party project that Zig uses.
Projects
None yet
Development

No branches or pull requests

1 participant