Dominator opts slows down the bresenham line drawing loop by roughly 20%. -O2 -fno-dominator-opts results in pretty straighline code: .L14: addl $18, %edx .L5: testl %edx, %edx movb $5, (%eax) js .L6 addl $21, %eax subl $40, %edx .L6: incl %eax cmpl %eax, %ecx jne .L14
While dominator combines the additions into quite ugly result: .L5: movl %ecx, %edx addl $18, %edx movb $5, 1(%ebx) js .L6 leal 22(%ebx), %eax leal -22(%ecx), %edx .L6: movl %eax, %ebx movl %edx, %ecx leal 1(%ebx), %eax cmpl %eax, %esi jne .L5 .L15: -- Summary: Dominator opts slows down bresenham line drawing by roughly 20% Product: gcc Version: 4.1.0 Status: UNCONFIRMED Severity: normal Priority: P2 Component: tree-optimization AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: hubicka at gcc dot gnu dot org CC: gcc-bugs at gcc dot gnu dot org GCC target triplet: i686-linux http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23181