1 --- a/gcc/config/avr32/avr32.c
2 +++ b/gcc/config/avr32/avr32.c
3 @@ -6726,7 +6726,28 @@ avr32_reorg_optimization (void)
7 - if (TARGET_MD_REORG_OPTIMIZATION && (optimize_size || (optimize > 0)))
8 + /* Disabled this optimization since it has a bug */
9 + /* In the case where the data instruction the shifted insn gets folded
10 + * into is a branch destination, this breaks, i.e.
12 + * add r8, r10, r8 << 2
22 + * ld.w r11, r10[r8 << 2]
27 + * which is clearly wrong..
29 + if (0 && TARGET_MD_REORG_OPTIMIZATION && (optimize_size || (optimize > 0)))
32 /* Scan through all insns looking for shifted add operations */