[llvm-bugs] [Bug 36830] New: [BasicAA] test-suite stepanov_v1p2 fails with -disable-basicaa

via llvm-bugs llvm-bugs at lists.llvm.org
Wed Mar 21 02:42:30 PDT 2018


https://bugs.llvm.org/show_bug.cgi?id=36830

            Bug ID: 36830
           Summary: [BasicAA] test-suite stepanov_v1p2 fails with
                    -disable-basicaa
           Product: libraries
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: Scalar Optimizations
          Assignee: unassignedbugs at nondot.org
          Reporter: paulsson at linux.vnet.ibm.com
                CC: llvm-bugs at lists.llvm.org

Created attachment 20095
  --> https://bugs.llvm.org/attachment.cgi?id=20095&action=edit
reduced testcase

I have reduced this and found out that the only difference of the succeeding
and failing programs lies in the initialization of two pointers:

        .type   s_end, at object           # @s_end
+       .section        .bss,"aw", at nobits
        .globl  s_end
        .p2align        3
 s_end:
-       .quad   double_array+16000
+       .space  8
        .size   s_end, 8

        .type   t_0, at object             # @t_0
        .globl  t_0
        .p2align        3
 t_0:
-       .quad   double_array
+       .space  8
        .size   t_0, 8

s_end is supposed to point to the end of the array, and t_0 to its first
element.

The code is otherwise identical, and it certainly seems to assume that these
addresses have been initialized correctly.

Not sure exactly why this happens, but it seems to take place before
instruction selection, during the LLVM I/R optimization passes. The difference
after them is also only in the declaration of @s_end and @t_0.

bin/clang -O3 -march=z13 ./stepanov_v1p2.ii -o ./a.out; ./a.out
test 0 passed: 6000.000000 == 6000.000000

bin/clang -O3 -march=z13 ./stepanov_v1p2.ii -o ./a.out -mllvm -disable-basicaa;
./a.out
test 0 failed: 0.000000 != 6000.000000

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20180321/523d6b60/attachment-0001.html>


More information about the llvm-bugs mailing list