Hi. There is a regression on i386 platforms.
int f(int a, int b) {return (((long long) a) * b) >> 15;} The gcc 4.0/4.1 generates with "-O3 -fomit-frame-pointer" movl 8(%esp), %eax imull 4(%esp) shrdl $15, %edx, %eax sarl $15, %edx ret While gcc-3.3/3.4 generates equal and faster movl 8(%esp), %eax imull 4(%esp) shrdl $15, %edx, %eax ret -- Summary: [regression] missed-optimization (in unneeded code elimination) Product: gcc Version: 4.1.1 Status: UNCONFIRMED Severity: enhancement Priority: P3 Component: target AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: Petr dot Salinger at seznam dot cz GCC host triplet: i486 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29401