public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug middle-end/115307] New: [avr] Don't expand isinf() like a built-in
@ 2024-05-31 13:50 gjl at gcc dot gnu.org
  2024-05-31 13:52 ` [Bug middle-end/115307] " gjl at gcc dot gnu.org
                   ` (8 more replies)
  0 siblings, 9 replies; 10+ messages in thread
From: gjl at gcc dot gnu.org @ 2024-05-31 13:50 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 115307
           Summary: [avr] Don't expand isinf() like a built-in
           Product: gcc
           Version: 14.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: middle-end
          Assignee: unassigned at gcc dot gnu.org
          Reporter: gjl at gcc dot gnu.org
  Target Milestone: ---

avr-gcc compiles

int isinff (float);

int call_isinff (float f)
{
    return isinff (f);
}

like:
call_isinff:
        push r12                 ;  63  [c=4 l=1]  pushqi1/0
        push r13                 ;  64  [c=4 l=1]  pushqi1/0
        push r14                 ;  65  [c=4 l=1]  pushqi1/0
        push r15                 ;  66  [c=4 l=1]  pushqi1/0
        push r28                 ;  67  [c=4 l=1]  pushqi1/0
/* prologue: function */
/* frame size = 0 */
/* stack size = 5 */
.L__stack_usage = 5
        movw r12,r22     ;  56  [c=4 l=2]  *movsf/0
        movw r14,r24
        clt      ;  57  [c=4 l=2]  *abssf2/1
        bld r15,7
        ldi r28,lo8(1)   ;  58  [c=4 l=1]  movqi_insn/1
        ldi r18,lo8(-1)  ;  59  [c=4 l=4]  *movsf/4
        ldi r19,lo8(-1)
        ldi r20,lo8(127)
        ldi r21,lo8(127)
        movw r24,r14     ;  60  [c=4 l=2]  *movsf/0
        movw r22,r12
        call __unordsf2  ;  10  [c=12 l=2]  call_value_insn/1
        cpse r24,__zero_reg__    ;  61  [c=0 l=1]  enable_interrupt-3
        rjmp .L2
        ldi r18,lo8(-1)  ;  52  [c=4 l=4]  *movsf/4
        ldi r19,lo8(-1)
        ldi r20,lo8(127)
        ldi r21,lo8(127)
        movw r24,r14     ;  53  [c=4 l=2]  *movsf/0
        movw r22,r12
        call __lesf2     ;  15  [c=12 l=2]  call_value_insn/1
        cp __zero_reg__,r24      ;  77  [c=16 l=1]  *swapped_tstqi
        brge .L2                 ;  78  [c=4 l=1]  branch
        ldi r28,0                ;  51  [c=4 l=1]  movqi_insn/0
.L2:
        ldi r24,lo8(1)   ;  45  [c=4 l=1]  movqi_insn/1
        eor r24,r28      ;  46  [c=4 l=1]  *xorqi3
        ldi r25,0                ;  50  [c=4 l=1]  movqi_insn/0
/* epilogue start */
        pop r28          ;  70  [c=4 l=1]  popqi
        pop r15          ;  71  [c=4 l=1]  popqi
        pop r14          ;  72  [c=4 l=1]  popqi
        pop r13          ;  73  [c=4 l=1]  popqi
        pop r12          ;  74  [c=4 l=1]  popqi
        ret              ;  75  [c=0 l=1]  return_from_epilogue

where a simple call to isinff would be mush better.

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2024-06-03 17:12 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-05-31 13:50 [Bug middle-end/115307] New: [avr] Don't expand isinf() like a built-in gjl at gcc dot gnu.org
2024-05-31 13:52 ` [Bug middle-end/115307] " gjl at gcc dot gnu.org
2024-05-31 15:49 ` [Bug target/115307] " rguenth at gcc dot gnu.org
2024-06-01  8:54 ` [Bug tree-optimization/115307] " cvs-commit at gcc dot gnu.org
2024-06-01  9:12 ` cvs-commit at gcc dot gnu.org
2024-06-01  9:14 ` gjl at gcc dot gnu.org
2024-06-01  9:34 ` gjl at gcc dot gnu.org
2024-06-01 11:40 ` cvs-commit at gcc dot gnu.org
2024-06-01 15:21 ` gjl at gcc dot gnu.org
2024-06-03 17:12 ` jsm28 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).