http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60172
Thomas Preud'homme <thomas.preudhomme at arm dot com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |thomas.preudhomme at arm dot com --- Comment #14 from Thomas Preud'homme <thomas.preudhomme at arm dot com> --- (In reply to Steven Bosscher from comment #12) > Annotated "bad expansion": > ;; _40 = Arr_2_Par_Ref_22(D) + _12; > 22: r138=r128+r121 > 23: r127=r132+r138 // r127=Arr_2_Par_Ref+r128+r121 > > ;; _32 = _20 + 1000; > 29: r124=r121+1000 > > ;; MEM[(int[25] *)_51 + 20B] = _34; > 32: r141=r132+r124 // r141=Arr_2_Par_Ref+r121+1000 > 33: r142=r141+r128 // r142=Arr_2_Par_Ref+r128+r121+1000 (==r127+1000) > 34: [r142+20]=r126 So in gimple the two offsets are added first and then added to the pointer while after expansion the first offset is added to the pointer and then the second offset. Is it normal that the order of operations seems to change?