Skip to content

Port divide-by-constant magic number optimizations from simple_preopt to ISLE mid-end #6049

Open
@fitzgen

Description

@fitzgen

This is the old simple preopt stuff for some number divided/remaindered by a non-power-of-two constant:

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    cranelift:mid-endclif-to-clif related passes, legalizations, etc...isleRelated to the ISLE domain-specific language

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions