Skip to content
Snippets Groups Projects
Commit 3fa3fb79 authored by John Ericson's avatar John Ericson Committed by Marge Bot
Browse files

Add more boundary checks for `rem` and `mod`

It's quite backend-dependent whether we will actually handle that case
right, so let's just always do this as a precaution.

In particular, once we replace the native primops used here with the new
sized primops, the 16-bit ones on x86 will begin to use 16-bit sized
instructions where they didn't before.

Though I'm not sure of any arch which has 8-bit scalar instructions, I
also did those for consistency. Plus, there are *vector* 8-bit ops in
the wild, so if we ever got into autovectorization or something maybe
it's prudent to put this here as a reminder not to forget about
catching overflows.

Progress towards #19026
parent d4605e7c
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment