diff options
author | Alon Zakai <azakai@google.com> | 2024-04-11 12:45:42 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-04-11 12:45:42 -0700 |
commit | 0b0c338bdd66227919d1de474e5eaae0d92e03e4 (patch) | |
tree | a2f79b482ad90eda0e2734eaa7b08652f6c939dd /src/support/string.cpp | |
parent | da8b071ba8c5cd290853188a6b7704417ca254eb (diff) | |
download | binaryen-0b0c338bdd66227919d1de474e5eaae0d92e03e4.tar.gz binaryen-0b0c338bdd66227919d1de474e5eaae0d92e03e4.tar.bz2 binaryen-0b0c338bdd66227919d1de474e5eaae0d92e03e4.zip |
Fix ConstantFieldPropagation signed packed field handling and improve Heap2Local's (#6493)
CFP already had logic for truncating but not for sign-extending, which this
fixes.
Use the new helper function in Heap2Local as well. This changes the model
there from "truncate on set, sign-extend on get" to "truncate or sign-extend
on get". That is both simpler by reusing the same logic as CFP but also more
optimal: the idea to truncate on sets made sense since sets are rarer, but if
we must then sign-extend on gets then we can end up doing more work
overall (as the truncations on sets are not needed if all gets are signed).
Found by #6486
Diffstat (limited to 'src/support/string.cpp')
0 files changed, 0 insertions, 0 deletions