-
Notifications
You must be signed in to change notification settings - Fork 516
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
vertexfilter: Remove redundant WASM instructions
After a fast float->int conversion for signed numbers, we were adjusting the result to get the byte representation. First, for values in a range where conversion works (-2^22..2^22), we already know the resulting exponent so we can subtract 0x4B40_0000 without masking. Second, because we only need low 8/16 bits anyway, we can skip that as well. LLVM was actually eliding the and + sub for us since it knows we only need the low 8/16 bits so this doesn't affect performance/codegen.
- Loading branch information
Showing
1 changed file
with
13 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters