On Thu, Jul 09, 2015 at 11:05:27AM -0700, H.J. Lu wrote: > We reduce code size for IA MCU by adjusting variable shift costs for IA > MCU. OK for trunk? > > Thanks. > > > H.J. > --- > PR target/66821 > * config/i386/i386.c (iamcu_cost): Adjust variable shift costs.
I checked in this patch to add a testcase for PR target/66821. H.J. --- Index: ChangeLog =================================================================== --- ChangeLog (revision 227132) +++ ChangeLog (working copy) @@ -1,5 +1,10 @@ 2015-08-24 H.J. Lu <hongjiu...@intel.com> + PR target/66821 + * gcc.target/i386/pr66821.c: New test. + +2015-08-24 H.J. Lu <hongjiu...@intel.com> + PR target/67329 * gcc.target/i386/pr67329.c: New test. Index: gcc.target/i386/pr66821.c =================================================================== --- gcc.target/i386/pr66821.c (revision 0) +++ gcc.target/i386/pr66821.c (working copy) @@ -0,0 +1,15 @@ +/* { dg-do compile { target ia32 } } */ +/* { dg-options "-O2 -fdump-tree-optimized -mtune=iamcu" } */ + +void bar (void); + +void +foo (int x) +{ + if (x != 2 && x != 3 && x != 10 && x != 11 && x != 17 && x != 18 && x != 23) + bar (); +} + +/* Check if the tests have been folded into a bit test. */ +/* { dg-final { scan-tree-dump "(8784908|0x0*860c0c)" "optimized" } } */ +/* { dg-final { scan-tree-dump "(<<|>>)" "optimized" } } */