authorgravatar for mlugg@mlugg.co.ukMatthew Lugg <mlugg@mlugg.co.uk> 2024-11-11 12:20:30+00:00
committergravatar for mlugg@mlugg.co.ukMatthew Lugg <mlugg@mlugg.co.uk> 2024-11-11 12:22:55+00:00
log6e56bc1096eb99a065bc7222bf3264142251da6d
tree66e6d8479ad4152b9fee6f958f1061f86c180584
parentca12e4f33e9030e5e724aae2f6dda9f2d87dccf6
signaturelock-open Commit is signed but in an unrecognized format.

test: add new incremental case

This is similar to the old `llvm/shift_right_plus_left` case, which was disabled by 1b1c78c. The case is not enabled on the LLVM backend, since incremental compilation support for this backend is a work in progress and is tracked by #21165. It passes on the x86_64-linux target with the self-hosted backend. Resolves: #12288

1 files changed, 23 insertions(+), 0 deletions(-)

test/incremental/change_shift_op created+23
...@@ -0,0 +1,23 @@
1#target=x86_64-linux-selfhosted
2#target=x86_64-linux-cbe
3#target=x86_64-windows-cbe
4#update=initial version
5#file=main.zig
6pub fn main() !void {
7 try foo(0x1300);
8}
9fn foo(x: u16) !void {
10 try std.io.getStdOut().writer().print("0x{x}\n", .{x << 4});
11}
12const std = @import("std");
13#expect_stdout="0x3000\n"
14#update=change to right shift
15#file=main.zig
16pub fn main() !void {
17 try foo(0x1300);
18}
19fn foo(x: u16) !void {
20 try std.io.getStdOut().writer().print("0x{x}\n", .{x >> 4});
21}
22const std = @import("std");
23#expect_stdout="0x130\n"