We need a minimum branch cost of 2 to make the expected optimization happen.
Tested for avr with --target_board=atmega128-sim and native on i686-pc-linuc-gnu.
Ok to apply?
2013-08-16 Joern Rennecke <joern.renne...@embecosm.com> * gcc.dg/tree-ssa/vrp87.c [avr-*-*] (dg-additional-options): New. Index: gcc.dg/tree-ssa/vrp87.c =================================================================== --- gcc.dg/tree-ssa/vrp87.c (revision 201835) +++ gcc.dg/tree-ssa/vrp87.c (working copy) @@ -1,6 +1,7 @@ /* { dg-do compile { target { ! "m68k*-*-* mmix*-*-* mep*-*-* bfin*-*-* v850*-*-* picochip*-*-* moxie*-*-* cris*-*-* m32c*-*-* fr30*-*-* mcore*-*-* powerpc*-*-* xtensa*-*-*"} } } */ /* { dg-options "-O2 -fdump-tree-vrp2-details -fdump-tree-cddce2-details" } */ +/* { dg-additional-options "-mbranch-cost=2" { target avr-*-* } } */ struct bitmap_head_def; typedef struct bitmap_head_def *bitmap;