Skip to content

MIPS: trap is not needed if divisor is not zero #130629

Closed
@wzssyqa

Description

@wzssyqa
int m(int a) {return a/1234;}

will be built to

        li      $2,1234                 # 0x4d2
        teq     $2,$0,7
        div     $0,$4,$2
        jr      $31
        mfhi    $2

Here the teq is not needed.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions