PR17103 states that mulli is better than decomposing into shift/add sequence. Following is example where we are being inconsistent about that decision.
Compiled with gcc -O2 -mcpu=power4 -m32 struct S { int i1,i2,i3,i4,i5,i6; }s[10]; int y; int test1(int j, int x) { y = y * 24; // shift/sub s[j].i1 = 1; // mulli return (x * 24); // mulli } -- Summary: Inconsistent multiply by immediate Product: gcc Version: 4.1.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: other AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: pthaugen at us dot ibm dot com CC: gcc-bugs at gcc dot gnu dot org GCC build triplet: powerpc64-linux GCC host triplet: powerpc64-linux GCC target triplet: powerpc64-linux http://gcc.gnu.org/bugzilla/show_bug.cgi?id=22067