From 1d86eae5269edcac5f32d166f13ed27483f07688 Mon Sep 17 00:00:00 2001
From: Travis Staloch
- Once Saturating arithmetic. - is completed, the syntax {#syntax#}a +| b{#endsyntax#} will be equivalent to calling {#syntax#}@addWithSaturation(a, b){#endsyntax#}. + The syntax {#syntax#}a +| b{#endsyntax#} is equivalent to calling {#syntax#}@addWithSaturation(a, b){#endsyntax#}.
{#header_close#} {#header_open|@alignCast#} @@ -8372,8 +8371,7 @@ test "@wasmMemoryGrow" { Returns {#syntax#}a * b{#endsyntax#}. The result will be clamped between the type maximum and minimum.- Once Saturating arithmetic. - is completed, the syntax {#syntax#}a *| b{#endsyntax#} will be equivalent to calling {#syntax#}@mulWithSaturation(a, b){#endsyntax#}. + The syntax {#syntax#}a *| b{#endsyntax#} is equivalent to calling {#syntax#}@mulWithSaturation(a, b){#endsyntax#}.
NOTE: Currently there is a bug in the llvm.smul.fix.sat intrinsic which affects {#syntax#}@mulWithSaturation{#endsyntax#} of signed integers. @@ -8629,8 +8627,7 @@ test "@setRuntimeSafety" { Returns {#syntax#}a << b{#endsyntax#}. The result will be clamped between type minimum and maximum.
- Once Saturating arithmetic. - is completed, the syntax {#syntax#}a <<| b{#endsyntax#} will be equivalent to calling {#syntax#}@shlWithSaturation(a, b){#endsyntax#}. + The syntax {#syntax#}a <<| b{#endsyntax#} is equivalent to calling {#syntax#}@shlWithSaturation(a, b){#endsyntax#}.
Unlike other @shl builtins, shift_amt doesn't need to be a Log2T as saturated overshifting is well defined. @@ -8954,8 +8951,7 @@ fn doTheTest() !void { Returns {#syntax#}a - b{#endsyntax#}. The result will be clamped between the type maximum and minimum.
- Once Saturating arithmetic. - is completed, the syntax {#syntax#}a -| b{#endsyntax#} will be equivalent to calling {#syntax#}@subWithSaturation(a, b){#endsyntax#}. + The syntax {#syntax#}a -| b{#endsyntax#} is equivalent to calling {#syntax#}@subWithSaturation(a, b){#endsyntax#}.
{#header_close#}