x86_64: implement optimized float @reduce(.Min)
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -1111,10 +1111,10 @@
|
||||
.{ .fcomp, .z, .{ }, .{ 0xd8, 0xd9 }, 0, .none, .x87 },
|
||||
.{ .fcompp, .z, .{ }, .{ 0xde, 0xd9 }, 0, .none, .x87 },
|
||||
|
||||
.{ .fcomi, .zo, .{ .st0, .st }, .{ 0xdb, 0xf0 }, 0, .none, .x87 },
|
||||
.{ .fcomip, .zo, .{ .st0, .st }, .{ 0xdf, 0xf0 }, 0, .none, .x87 },
|
||||
.{ .fucomi, .zo, .{ .st0, .st }, .{ 0xdb, 0xe8 }, 0, .none, .x87 },
|
||||
.{ .fucomip, .zo, .{ .st0, .st }, .{ 0xdf, 0xe8 }, 0, .none, .x87 },
|
||||
.{ .fcomi, .zo, .{ .st0, .st }, .{ 0xdb, 0xf0 }, 0, .none, .@"cmov x87" },
|
||||
.{ .fcomip, .zo, .{ .st0, .st }, .{ 0xdf, 0xf0 }, 0, .none, .@"cmov x87" },
|
||||
.{ .fucomi, .zo, .{ .st0, .st }, .{ 0xdb, 0xe8 }, 0, .none, .@"cmov x87" },
|
||||
.{ .fucomip, .zo, .{ .st0, .st }, .{ 0xdf, 0xe8 }, 0, .none, .@"cmov x87" },
|
||||
|
||||
.{ .fcos, .z, .{}, .{ 0xd9, 0xff }, 0, .none, .x87 },
|
||||
|
||||
|
||||
@@ -5128,6 +5128,15 @@ test reduceMul {
|
||||
try test_reduce_mul.testFloatVectors();
|
||||
}
|
||||
|
||||
inline fn reduceMinOptimized(comptime Type: type, rhs: Type) @typeInfo(Type).vector.child {
|
||||
@setFloatMode(.optimized);
|
||||
return @reduce(.Min, rhs);
|
||||
}
|
||||
test reduceMinOptimized {
|
||||
const test_reduce_min_optimized = unary(reduceMinOptimized, .{});
|
||||
try test_reduce_min_optimized.testFloatVectors();
|
||||
}
|
||||
|
||||
inline fn reduceAddOptimized(comptime Type: type, rhs: Type) @typeInfo(Type).vector.child {
|
||||
@setFloatMode(.optimized);
|
||||
return @reduce(.Add, rhs);
|
||||
|
||||
Reference in New Issue
Block a user