------- Comment #3 from pinskia at gcc dot gnu dot org 2007-03-26 22:27 ------- 3.2.3 produced: .L6: slwi 0,9,2 add 9,9,5 cmpw 0,9,4 stwx 11,3,0 bgelr- 0 b .L6
While 4.1.0 and above produces: .L4: add 9,9,5 stw 10,-4(3) add 3,3,11 subf 0,5,9 cmpw 7,4,0 bgt 7,.L4 If we change "int *" to "char *" and set c to be 2, we get even worse code gen. 3.2.3: .L9: stbx 11,3,9 addi 9,9,2 bdnz .L9 blr 4.1.0: .L4: add 9,3,11 addi 11,11,2 cmpw 7,4,11 stb 0,-1(9) bgt 7,.L4 What happened to bdnz and we are now doing *(r9+r3-1) = r0 inside the loop? -- pinskia at gcc dot gnu dot org changed: What |Removed |Added ---------------------------------------------------------------------------- Known to fail| |4.1.0 4.2.0 4.3.0 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31358