Skip to content

Div/mod behavior should be consistent in the compiler and analysis #779

@yamaguchi1024

Description

@yamaguchi1024

Right now, LoopIR_compiler ensures the floor division (exo_floor_div) for negative expressions, but mod just naively lowers to C's mod %, which is incorrect for negative expressions. mod will be positive for negative expressions to be consistent with the division.

Metadata

Metadata

Assignees

No one assigned

    Labels

    C: CodegenThe final C code generationC: Prog AnalysisRelated to formal analysis, SMT, etc.S: AvailableAvailable to be worked upon

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions