wasm: Improve shl_with_overflow

This re-implements the shl_with_overflow operation from scratch,
making it a lot more robust and outputs the equal code to the LLVM backend.
This commit is contained in:
Luuk de Gram
2022-05-13 21:25:23 +02:00
committed by Andrew Kelley
parent 0a2d3d4155
commit 160aa4c11d
3 changed files with 49 additions and 120 deletions

View File

@@ -146,7 +146,6 @@ test "while with optional as condition" {
if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest;
if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest;
if (builtin.zig_backend == .stage2_wasm) return error.SkipZigTest;
numbers_left = 10;
var sum: i32 = 0;
@@ -160,7 +159,6 @@ test "while with optional as condition with else" {
if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest;
if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest;
if (builtin.zig_backend == .stage2_wasm) return error.SkipZigTest;
numbers_left = 10;
var sum: i32 = 0;
@@ -179,7 +177,6 @@ test "while with error union condition" {
if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest;
if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest;
if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest;
if (builtin.zig_backend == .stage2_wasm) return error.SkipZigTest;
numbers_left = 10;
var sum: i32 = 0;