[LLVMbugs] [Bug 18460] New: AA incorrect NoAlias result

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Mon Jan 13 12:36:38 PST 2014


http://llvm.org/bugs/show_bug.cgi?id=18460

            Bug ID: 18460
           Summary: AA incorrect NoAlias result
           Product: libraries
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: Global Analyses
          Assignee: unassignedbugs at nondot.org
          Reporter: hfinkel at anl.gov
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified

Created attachment 11865
  --> http://llvm.org/bugs/attachment.cgi?id=11865&action=edit
bugpoint reduced test case

BasicAliasAnalysis is incorrectly returning NoAlias in the following situation:

  %end147 = getelementptr inbounds %"struct.llvm::LiveRange::Segment"* %v97,
i64 -1, i32 1
  %end151 = getelementptr inbounds %"struct.llvm::LiveRange::Segment"* %Seg,
i64 0, i32 1
  %Value.i.i.i.i.i.i = getelementptr inbounds %"class.llvm::SlotIndex"*
%end147, i64 0, i32 0, i32 0
  ...
  %__b.__a.i = select i1 %cmp.i.i, %"class.llvm::SlotIndex"* %end151,
%"class.llvm::SlotIndex"* %end147
  %v117 = getelementptr inbounds %"class.llvm::SlotIndex"* %__b.__a.i, i64 0,
i32 0, i32 0
  %v118 = load i64* %v117, align 8, !tbaa !20
  store i64 undef, i64* %Value.i.i.i.i.i.i, align 8, !tbaa !20

Running:

opt -tbaa -basicaa -aa-eval -evaluate-tbaa -print-no-aliases -print-may-aliases
-disable-output < bugpoint-reduced-simplified.ll

will display (near the end of the output):

  NoAlias:   %v118 = load i64* %v117, align 8, !tbaa !12 <->   store i64 undef,
i64* %Value.i.i.i.i.i.i, align 8, !tbaa !12

This is incorrect, essentially saying that (gep(%end147, 0, 0, 0)) does not
alias (gep(select(..., ..., %end147), 0, 0, 0)), and it certainly might!

I've attached a test case (which is derived from LLVM's LiveInterval.cpp),
which is a bugpoint-reduced file (with some manual cleanup).

-- 
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/20140113/342096fe/attachment.html>


More information about the llvm-bugs mailing list