Issue 130629
Summary MIPS: trap is not needed if divisor is not zero
Labels backend:MIPS
Assignees
Reporter 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.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to