From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 35664 invoked by alias); 16 Aug 2015 20:28:34 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 35650 invoked by uid 48); 16 Aug 2015 20:28:30 -0000 From: "f.boesing at gmx dot de" To: gcc-bugs@gcc.gnu.org Subject: [Bug c/67242] Missing optimization with float Date: Sun, 16 Aug 2015 20:28:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c X-Bugzilla-Version: 4.9.3 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: f.boesing at gmx dot de X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2015-08/txt/msg01070.txt.bz2 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67242 --- Comment #2 from Frank --- x86-64: .file "bug.c" .section .text.unlikely,"x" .LCOLDB0: .text .LHOTB0: .p2align 4,,15 .globl bug .def bug; .scl 2; .type 32; .endef .seh_proc bug bug: .seh_endprologue movl $999, dummy(%rip) xorl %eax, %eax .p2align 4,,10 .L2: pxor %xmm0, %xmm0 cvtsi2ss %eax, %xmm0 addl $1, %eax cmpl $1000, %eax jne .L2 movss %xmm0, dummyfloat(%rip) movl $1000, n(%rip) ret .seh_endproc .section .text.unlikely,"x" .LCOLDE0: .text .LHOTE0: .comm dummyfloat, 4, 2 .comm dummy, 4, 2 .comm n, 4, 2 .ident "GCC: (tdm64-1) 4.9.2" arm-thumb, soft float: .cpu arm7tdmi .fpu softvfp .eabi_attribute 20, 1 .eabi_attribute 21, 1 .eabi_attribute 23, 3 .eabi_attribute 24, 1 .eabi_attribute 25, 1 .eabi_attribute 26, 1 .eabi_attribute 30, 2 .eabi_attribute 34, 0 .eabi_attribute 18, 4 .code 16 .file "bug.c" .global __aeabi_i2f .text .align 2 .global bug .code 16 .thumb_func .type bug, %function bug: push {r3, r4, r5, lr} mov r5, #250 mov r4, #0 ldr r2, .L5 ldr r3, .L5+4 str r2, [r3] lsl r5, r5, #2 .L2: mov r0, r4 add r4, r4, #1 bl __aeabi_i2f cmp r4, r5 bne .L2 ldr r3, .L5+8 str r0, [r3] ldr r3, .L5+12 @ sp needed str r4, [r3] pop {r3, r4, r5} pop {r0} bx r0 .L6: .align 2 .L5: .word 999 .word dummy .word dummyfloat .word n .size bug, .-bug .comm dummyfloat,4,4 .comm dummy,4,4 .comm n,4,4 .ident "GCC: (GNU Tools for ARM Embedded Processors) 4.9.3 20150529 (release) [ARM/embedded-4_9-branch revision 224288]"