This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug tree-optimization/14784] [Tree-ssa] alias analysis deficiency



------- Comment #12 from hjl at lucon dot org  2006-10-31 21:48 -------
Created an attachment (id=12521)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=12521&action=view)
A testcase

Here is a testcase. Both bad.s and good.s are compiled with -O2. The
difference in assembly output is

[hjl@gnu-25 xxx]$ diff -up bad.s good.s
--- bad.s       2006-10-31 13:22:44.000000000 -0800
+++ good.s      2006-10-31 13:22:44.000000000 -0800
@@ -31,14 +31,14 @@ add_fde_cfi:
        pushq   %rbx
 .LCFI2:
        movq    %rdi, %rbx
-       je      .L36
+       je      .L35
        movl    fde_table_in_use(%rip), %eax
        subl    $1, %eax
        leaq    (%rax,%rax,4), %rax
        leaq    0(,%rax,8), %rbp
        addq    fde_table(%rip), %rbp
        cmpb    $0, (%rdi)
-       je      .L37
+       je      .L36
 .L16:
        movq    8(%rbp), %rsi
        testq   %rsi, %rsi
@@ -46,7 +46,7 @@ add_fde_cfi:
        movq    %rbx, %rdi
        call    strcmp
        testl   %eax, %eax
-       je      .L38
+       je      .L20
 .L18:
        movq    %rbx, %rdi
        call    xstrdup
@@ -55,54 +55,50 @@ add_fde_cfi:
        call    new_cfi
        movq    %rbx, 16(%rax)
        movq    24(%rbp), %rdx
-       leaq    24(%rbp), %rsi
+       leaq    24(%rbp), %rcx
        movl    $4, 8(%rax)
        testq   %rdx, %rdx
-       movq    %rdx, %rcx
-       je      .L24
+       je      .L23
        .p2align 4,,7
-.L25:
-       movq    %rcx, %rsi
-       movq    (%rcx), %rcx
-       testq   %rcx, %rcx
-       jne     .L25
-.L24:
-       movq    %rax, (%rsi)
-.L21:
+.L30:
+       movq    %rdx, %rcx
+       movq    (%rdx), %rdx
        testq   %rdx, %rdx
+       jne     .L30
+.L23:
+       movq    %rax, (%rcx)
+.L20:
+       movq    24(%rbp), %rdx
        leaq    24(%rbp), %rax
-       je      .L28
+       testq   %rdx, %rdx
+       je      .L26
        .p2align 4,,7
-.L32:
+.L31:
        movq    %rdx, %rax
        movq    (%rdx), %rdx
        testq   %rdx, %rdx
-       jne     .L32
-.L28:
+       jne     .L31
+.L26:
        movq    %r12, (%rax)
        popq    %rbx
        popq    %rbp
        popq    %r12
        ret
-.L38:
-       movq    24(%rbp), %rdx
-       jmp     .L21
-.L37:
+.L36:
        call    dwarf2out_cfi_label
        movq    %rax, %rbx
-       .p2align 4,,4
        jmp     .L16
-.L36:
+.L35:
        movq    cie_cfi_head(%rip), %rax
        movl    $cie_cfi_head, %edx
        testq   %rax, %rax
        je      .L15
        .p2align 4,,7
-.L31:
+.L29:
        movq    %rax, %rdx
        movq    (%rax), %rax
        testq   %rax, %rax
-       jne     .L31
+       jne     .L29
 .L15:
        movq    %r12, (%rdx)
        popq    %rbx
@@ -220,5 +216,5 @@ add_fde_cfi:
        .uleb128 0x3
        .align 8
 .LEFDE3:
-       .ident  "GCC: (GNU) 4.3.0 20061023 (experimental) [trunk revision
117986]"
+       .ident  "GCC: (GNU) 4.3.0 20061023 (experimental) [trunk revision
117985]"
        .section        .note.GNU-stack,"",@progbits


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14784


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]