public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/115678] New: MIPS: Condition trap can optimize
@ 2024-06-27  9:34 syq at gcc dot gnu.org
  0 siblings, 0 replies; only message in thread
From: syq at gcc dot gnu.org @ 2024-06-27  9:34 UTC (permalink / raw)
  To: gcc-bugs

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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2024-06-27  9:34 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-06-27  9:34 [Bug target/115678] New: MIPS: Condition trap can optimize syq at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).