http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49526
Summary: ARM missed optimization: SMMUL instruction Product: gcc Version: 4.7.0 Status: UNCONFIRMED Severity: enhancement Priority: P3 Component: target AssignedTo: unassig...@gcc.gnu.org ReportedBy: siarhei.siamas...@gmail.com $ cat test.c int smmul(int a, int b) { return ((long long)a * b) >> 32; } $ arm-none-linux-gnueabi-gcc -O2 -S -mcpu=cortex-a8 test.c $ cat test.s .cpu cortex-a8 .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, 2 .eabi_attribute 30, 2 .eabi_attribute 18, 4 .file "test.c" .text .align 2 .global smmul .type smmul, %function smmul: @ args = 0, pretend = 0, frame = 0 @ frame_needed = 0, uses_anonymous_args = 0 @ link register save eliminated. smull r0, r1, r0, r1 mov r0, r1 bx lr .size smmul, .-smmul .ident "GCC: (GNU) 4.7.0 20110624 (experimental)" .section .note.GNU-stack,"",%progbits