[llvm-bugs] [Bug 35225] New: Wrong tbaa metadata after load store vectorizer due to recent change

via llvm-bugs llvm-bugs at lists.llvm.org
Tue Nov 7 03:51:45 PST 2017


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

            Bug ID: 35225
           Summary: Wrong tbaa metadata after load store vectorizer due to
                    recent change
           Product: new-bugs
           Version: unspecified
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: new bugs
          Assignee: unassignedbugs at nondot.org
          Reporter: mikael.holmen at ericsson.com
                CC: llvm-bugs at lists.llvm.org

Created attachment 19377
  --> https://bugs.llvm.org/attachment.cgi?id=19377&action=edit
reproducer

Reproduce with:
clang -mllvm -disable-llvm-optzns -S -emit-llvm -Xclang -O1 -pedantic tbaa.c -o
tbaa.ll
opt -O1 -load-store-vectorizer -S -o tbaa.opt.ll tbaa.ll
-debug-only=load-store-vectorizer

and then in the tbaa.opt.ll we see that the two stores have been merged to one:

  store <2 x i32> %8, <2 x i32>* %9, align 4, !tbaa !6

but looking at !6 we see

!4 = !{!"omnipotent char", !5, i64 0}
!5 = !{!"Simple C/C++ TBAA"}
!6 = !{!7, !7, i64 0}
!7 = !{!"int", !4, i64 0}

so we say that the merged stores now write a single int?

This started happening recently, after the change r317311:

    [Analysis] Refine matching and merging of TBAA tags

    This patch combines the code that matches and merges TBAA access
    tags. The aim is to simplify future changes and making sure that
    these operations produce consistent results.

    Differential Revision: https://reviews.llvm.org/D39463

If reverting r317311 the merged store still get tbaa !6, but now !6 is:

!4 = !{!"omnipotent char", !5, i64 0}
!5 = !{!"Simple C/C++ TBAA"}
!6 = !{!4, !4, i64 0}

-- 
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/20171107/9e868e23/attachment-0001.html>


More information about the llvm-bugs mailing list