Commit ad5515bed8

Alex Rønne Petersen <alex@alexrp.com>
2025-02-24 14:49:27
compiler-rt: Add tests from llvm/llvm-project#119449.
1 parent c7e99b9
Changed files (3)
lib/compiler_rt/divdf3_test.zig
@@ -31,4 +31,5 @@ fn test__divdf3(a: f64, b: f64, expected: u64) !void {
 test "divdf3" {
     try test__divdf3(1.0, 3.0, 0x3fd5555555555555);
     try test__divdf3(4.450147717014403e-308, 2.0, 0x10000000000000);
+    try test__divdf3(1.0, 0x1.fffffffffffffp-1, 0x3ff0000000000001);
 }
lib/compiler_rt/divsf3_test.zig
@@ -31,4 +31,5 @@ fn test__divsf3(a: f32, b: f32, expected: u32) !void {
 test "divsf3" {
     try test__divsf3(1.0, 3.0, 0x3EAAAAAB);
     try test__divsf3(2.3509887e-38, 2.0, 0x00800000);
+    try test__divsf3(1.0, 0x1.fffffep-1, 0x3f800001);
 }
lib/compiler_rt/divtf3_test.zig
@@ -45,4 +45,5 @@ test "divtf3" {
     try test__divtf3(0x1.2d3456f789ba6322bc665544edefp-234, 0x1.eddcdba39f3c8b7a36564354321fp-4455, 0x507b38442b539266, 0x22ce0f1d024e1252);
     try test__divtf3(0x1.2345f6b77b7a8953365433abcdefp+234, 0x1.edcba987d6bb3aa467754354321fp-4055, 0x50bf2e02f0798d36, 0x5e6fcb6b60044078);
     try test__divtf3(6.72420628622418701252535563464350521E-4932, 2.0, 0x0001000000000000, 0);
+    try test__divtf3(1.0, 0x1.ffffffffffffffffffffffffffffp-1, 0x3FFF000000000000, 1);
 }