Skip to content

Commit b976e89

Browse files
LiamSwayneandrewrk
authored andcommitted
Add branch hint to unlikely branch of rem_pio2_large
Adds a `@branchHint` to a 1 in 12 branch of the pi/2 remainder calculation.
1 parent 5837147 commit b976e89

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

lib/compiler_rt/rem_pio2_large.zig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -356,6 +356,7 @@ pub fn rem_pio2_large(x: []f64, y: []f64, e0: i32, nx: i32, prec: usize) i32 {
356356
}
357357
}
358358
if (q0 > 0) { // rare case: chance is 1 in 12
359+
@branchHint(.unlikely);
359360
switch (q0) {
360361
1 => iq[@intCast(jz - 1)] &= 0x7fffff,
361362
2 => iq[@intCast(jz - 1)] &= 0x3fffff,

0 commit comments

Comments
 (0)