Merge pull request #15639 from jacobly0/signed-mod

llvm/cbe: fix signed `@mod`/`@divFloor` computations
This commit is contained in:
Andrew Kelley
2023-05-11 08:36:33 -07:00
committed by GitHub
4 changed files with 65 additions and 49 deletions
+3
View File
@@ -449,6 +449,9 @@ fn testDivision() !void {
try expect(mod(i32, 10, 12) == 10);
try expect(mod(i32, -14, 12) == 10);
try expect(mod(i32, -2, 12) == 10);
try expect(mod(i32, 10, -12) == -2);
try expect(mod(i32, -14, -12) == -2);
try expect(mod(i32, -2, -12) == -2);
comptime {
try expect(