This is the mail archive of the 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)
 --> (
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
        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
        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
        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
-       movq    %rcx, %rsi
-       movq    (%rcx), %rcx
-       testq   %rcx, %rcx
-       jne     .L25
-       movq    %rax, (%rsi)
+       movq    %rdx, %rcx
+       movq    (%rdx), %rdx
        testq   %rdx, %rdx
+       jne     .L30
+       movq    %rax, (%rcx)
+       movq    24(%rbp), %rdx
        leaq    24(%rbp), %rax
-       je      .L28
+       testq   %rdx, %rdx
+       je      .L26
        .p2align 4,,7
        movq    %rdx, %rax
        movq    (%rdx), %rdx
        testq   %rdx, %rdx
-       jne     .L32
+       jne     .L31
        movq    %r12, (%rax)
        popq    %rbx
        popq    %rbp
        popq    %r12
-       movq    24(%rbp), %rdx
-       jmp     .L21
        call    dwarf2out_cfi_label
        movq    %rax, %rbx
-       .p2align 4,,4
        jmp     .L16
        movq    cie_cfi_head(%rip), %rax
        movl    $cie_cfi_head, %edx
        testq   %rax, %rax
        je      .L15
        .p2align 4,,7
        movq    %rax, %rdx
        movq    (%rax), %rax
        testq   %rax, %rax
-       jne     .L31
+       jne     .L29
        movq    %r12, (%rdx)
        popq    %rbx
@@ -220,5 +216,5 @@ add_fde_cfi:
        .uleb128 0x3
        .align 8
-       .ident  "GCC: (GNU) 4.3.0 20061023 (experimental) [trunk revision
+       .ident  "GCC: (GNU) 4.3.0 20061023 (experimental) [trunk revision
        .section        .note.GNU-stack,"",@progbits


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