https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115678

            Bug ID: 115678
           Summary: MIPS: Condition trap can optimize
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: target
          Assignee: unassigned at gcc dot gnu.org
          Reporter: syq at gcc dot gnu.org
  Target Milestone: ---

void teq5 (int i) {
        if (i == 5)
                __builtin_trap();
}
void tne5 (int i) {
        if (i != 5)
                __builtin_trap();
}
void tge5 (int i) {
        if (i >= 5)
                __builtin_trap();
}
/* We have TGEI.  */


void tgeu5 (unsigned int i) {
        if (i >= 5)
                __builtin_trap();
}
/* We have TGEIU.  */

void tlt5 (int i) {
        if (i < 5)
                __builtin_trap();
}
/* We have TLTI.  */

void tle0 (int i) {
        if (i <= 0)
                __builtin_trap();
}
        move    $2,$0   # <--- not needed.
        tge     $2,$4

Reply via email to