| ... | @@ -805,14 +805,8 @@ test "vector reduce operation" { | ... | @@ -805,14 +805,8 @@ test "vector reduce operation" { |
| 805 | try testReduce(.Min, [4]u16{ 1, 2, 3, 4 }, @as(u16, 1)); | 805 | try testReduce(.Min, [4]u16{ 1, 2, 3, 4 }, @as(u16, 1)); |
| 806 | try testReduce(.Min, [4]i32{ 1234567, -386, 0, 3 }, @as(i32, -386)); | 806 | try testReduce(.Min, [4]i32{ 1234567, -386, 0, 3 }, @as(i32, -386)); |
| 807 | try testReduce(.Min, [4]u32{ 99, 9999, 9, 99999 }, @as(u32, 9)); | 807 | try testReduce(.Min, [4]u32{ 99, 9999, 9, 99999 }, @as(u32, 9)); |
| 808 | | 808 | try testReduce(.Min, [4]i64{ 1234567, -386, 0, 3 }, @as(i64, -386)); |
| 809 | // LLVM 11 ERROR: Cannot select type | 809 | try testReduce(.Min, [4]u64{ 99, 9999, 9, 99999 }, @as(u64, 9)); |
| 810 | // https://github.com/ziglang/zig/issues/7138 | | |
| 811 | if (builtin.zig_backend != .stage2_llvm or builtin.target.cpu.arch != .aarch64) { | | |
| 812 | try testReduce(.Min, [4]i64{ 1234567, -386, 0, 3 }, @as(i64, -386)); | | |
| 813 | try testReduce(.Min, [4]u64{ 99, 9999, 9, 99999 }, @as(u64, 9)); | | |
| 814 | } | | |
| 815 | | | |
| 816 | try testReduce(.Min, [4]i128{ 1234567, -386, 0, 3 }, @as(i128, -386)); | 810 | try testReduce(.Min, [4]i128{ 1234567, -386, 0, 3 }, @as(i128, -386)); |
| 817 | try testReduce(.Min, [4]u128{ 99, 9999, 9, 99999 }, @as(u128, 9)); | 811 | try testReduce(.Min, [4]u128{ 99, 9999, 9, 99999 }, @as(u128, 9)); |
| 818 | try testReduce(.Min, [4]f16{ -10.3, 10.0e9, 13.0, -100.0 }, @as(f16, -100.0)); | 812 | try testReduce(.Min, [4]f16{ -10.3, 10.0e9, 13.0, -100.0 }, @as(f16, -100.0)); |
| ... | @@ -823,14 +817,8 @@ test "vector reduce operation" { | ... | @@ -823,14 +817,8 @@ test "vector reduce operation" { |
| 823 | try testReduce(.Max, [4]u16{ 1, 2, 3, 4 }, @as(u16, 4)); | 817 | try testReduce(.Max, [4]u16{ 1, 2, 3, 4 }, @as(u16, 4)); |
| 824 | try testReduce(.Max, [4]i32{ 1234567, -386, 0, 3 }, @as(i32, 1234567)); | 818 | try testReduce(.Max, [4]i32{ 1234567, -386, 0, 3 }, @as(i32, 1234567)); |
| 825 | try testReduce(.Max, [4]u32{ 99, 9999, 9, 99999 }, @as(u32, 99999)); | 819 | try testReduce(.Max, [4]u32{ 99, 9999, 9, 99999 }, @as(u32, 99999)); |
| 826 | | 820 | try testReduce(.Max, [4]i64{ 1234567, -386, 0, 3 }, @as(i64, 1234567)); |
| 827 | // LLVM 11 ERROR: Cannot select type | 821 | try testReduce(.Max, [4]u64{ 99, 9999, 9, 99999 }, @as(u64, 99999)); |
| 828 | // https://github.com/ziglang/zig/issues/7138 | | |
| 829 | if (builtin.zig_backend != .stage2_llvm or builtin.target.cpu.arch != .aarch64) { | | |
| 830 | try testReduce(.Max, [4]i64{ 1234567, -386, 0, 3 }, @as(i64, 1234567)); | | |
| 831 | try testReduce(.Max, [4]u64{ 99, 9999, 9, 99999 }, @as(u64, 99999)); | | |
| 832 | } | | |
| 833 | | | |
| 834 | try testReduce(.Max, [4]i128{ 1234567, -386, 0, 3 }, @as(i128, 1234567)); | 822 | try testReduce(.Max, [4]i128{ 1234567, -386, 0, 3 }, @as(i128, 1234567)); |
| 835 | try testReduce(.Max, [4]u128{ 99, 9999, 9, 99999 }, @as(u128, 99999)); | 823 | try testReduce(.Max, [4]u128{ 99, 9999, 9, 99999 }, @as(u128, 99999)); |
| 836 | try testReduce(.Max, [4]f16{ -10.3, 10.0e9, 13.0, -100.0 }, @as(f16, 10.0e9)); | 824 | try testReduce(.Max, [4]f16{ -10.3, 10.0e9, 13.0, -100.0 }, @as(f16, 10.0e9)); |
| ... | @@ -872,17 +860,13 @@ test "vector reduce operation" { | ... | @@ -872,17 +860,13 @@ test "vector reduce operation" { |
| 872 | try testReduce(.Add, [4]f32{ -1.9, 5.1, f32_nan, 100.0 }, f32_nan); | 860 | try testReduce(.Add, [4]f32{ -1.9, 5.1, f32_nan, 100.0 }, f32_nan); |
| 873 | try testReduce(.Add, [4]f64{ -1.9, 5.1, f64_nan, 100.0 }, f64_nan); | 861 | try testReduce(.Add, [4]f64{ -1.9, 5.1, f64_nan, 100.0 }, f64_nan); |
| 874 | | 862 | |
| 875 | // LLVM 11 ERROR: Cannot select type | 863 | try testReduce(.Min, [4]f16{ -1.9, 5.1, f16_nan, 100.0 }, @as(f16, -1.9)); |
| 876 | // https://github.com/ziglang/zig/issues/7138 | 864 | try testReduce(.Min, [4]f32{ -1.9, 5.1, f32_nan, 100.0 }, @as(f32, -1.9)); |
| 877 | if (builtin.zig_backend != .stage2_llvm) { | 865 | try testReduce(.Min, [4]f64{ -1.9, 5.1, f64_nan, 100.0 }, @as(f64, -1.9)); |
| 878 | try testReduce(.Min, [4]f16{ -1.9, 5.1, f16_nan, 100.0 }, @as(f16, -1.9)); | | |
| 879 | try testReduce(.Min, [4]f32{ -1.9, 5.1, f32_nan, 100.0 }, @as(f32, -1.9)); | | |
| 880 | try testReduce(.Min, [4]f64{ -1.9, 5.1, f64_nan, 100.0 }, @as(f64, -1.9)); | | |
| 881 | | 866 | |
| 882 | try testReduce(.Max, [4]f16{ -1.9, 5.1, f16_nan, 100.0 }, @as(f16, 100.0)); | 867 | try testReduce(.Max, [4]f16{ -1.9, 5.1, f16_nan, 100.0 }, @as(f16, 100.0)); |
| 883 | try testReduce(.Max, [4]f32{ -1.9, 5.1, f32_nan, 100.0 }, @as(f32, 100.0)); | 868 | try testReduce(.Max, [4]f32{ -1.9, 5.1, f32_nan, 100.0 }, @as(f32, 100.0)); |
| 884 | try testReduce(.Max, [4]f64{ -1.9, 5.1, f64_nan, 100.0 }, @as(f64, 100.0)); | 869 | try testReduce(.Max, [4]f64{ -1.9, 5.1, f64_nan, 100.0 }, @as(f64, 100.0)); |
| 885 | } | | |
| 886 | | 870 | |
| 887 | try testReduce(.Mul, [4]f16{ -1.9, 5.1, f16_nan, 100.0 }, f16_nan); | 871 | try testReduce(.Mul, [4]f16{ -1.9, 5.1, f16_nan, 100.0 }, f16_nan); |
| 888 | try testReduce(.Mul, [4]f32{ -1.9, 5.1, f32_nan, 100.0 }, f32_nan); | 872 | try testReduce(.Mul, [4]f32{ -1.9, 5.1, f32_nan, 100.0 }, f32_nan); |