Port divide-by-constant magic number optimizations from simple_preopt
to ISLE mid-end
#6049
Labels
cranelift:mid-end
clif-to-clif related passes, legalizations, etc...
isle
Related to the ISLE domain-specific language
This is the old simple preopt stuff for some number divided/remaindered by a non-power-of-two constant:
https://github.com/bytecodealliance/wasmtime/blob/main/cranelift/codegen/src/divconst_magic_numbers.rs#L41-L217
https://github.com/bytecodealliance/wasmtime/blob/main/cranelift/codegen/src/simple_preopt.rs#L206-L243
The ISLE + e-graphs mid-end work replaced
simple_preopt
, but never ported these magic constants over. We should port them over.HOWEVER, right now we can't replace potentially-trapping instructions in ISLE, and we need that ability to do this.
The text was updated successfully, but these errors were encountered: