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

            Bug ID: 31594
           Summary: NewGVN failure while verifying memory congruency
           Product: libraries
           Version: trunk
          Hardware: PC
                OS: Windows NT
            Status: NEW
          Severity: normal
          Priority: P
         Component: Scalar Optimizations
          Assignee: unassignedb...@nondot.org
          Reporter: dav...@freebsd.org
                CC: llvm-bugs@lists.llvm.org
    Classification: Unclassified

I think this is a slight variation of PR31573.
  store i8 0, i8* %blah, align 1
and
  store i8 0, i8* %foo.lcssa, align 1
are believed to be congruent but they belong to two different congruence
classes, hence the assertion firing.


define void @patatino(i8* %blah, i32 %choice) {
entry:
  br label %while.cond

while.cond:
  %foo = phi i8* [ %blah, %entry ], [ null, %while.body ]
  switch i32 %choice, label %while.body [
    i32 -1, label %while.end
    i32 40, label %land.end
  ]

land.end:
  br label %while.end

while.body:
  br label %while.cond

while.end:
  %foo.lcssa = phi i8* [ %foo, %land.end ], [ %foo, %while.cond ]
  store i8 0, i8* %foo.lcssa, align 1
  %0 = load i8, i8* %blah, align 1
  %loaded = icmp eq i8 %0, 0
  store i8 0, i8* %blah, align 1
  ret void
}

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to