[llvm-bugs] [Bug 49121] New: opt crashes with "opt -O2 --attributor-enable=cgscc": Assertion `!UR.InvalidatedSCCs.count(C) && "Processing an invalid SCC!"' failed.

via llvm-bugs llvm-bugs at lists.llvm.org
Tue Feb 9 18:13:03 PST 2021


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

            Bug ID: 49121
           Summary: opt crashes with "opt -O2 --attributor-enable=cgscc":
                    Assertion `!UR.InvalidatedSCCs.count(C) && "Processing
                    an invalid SCC!"' failed.
           Product: libraries
           Version: trunk
          Hardware: PC
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: Interprocedural Optimizations
          Assignee: unassignedbugs at nondot.org
          Reporter: zequanwu at google.com
                CC: llvm-bugs at lists.llvm.org

reduced.ll:

%"a" = type { i64 }
%"b" = type { i8 }

define hidden i64 @f1() align 2 {
entry:
  %ref.tmp = alloca %"a", align 8
  %call2 = call i64 @f2(%"a"* %ref.tmp)
  ret i64 %call2
}

define internal i64 @f2(%"a"* %this) align 2 {
entry:
  %this.addr = alloca %"a"*, align 8
  store %"a"* %this, %"a"** %this.addr, align 8
  %this1 = load %"a"*, %"a"** %this.addr, align 8
  %0 = bitcast %"a"* %this1 to %"b"*
  call void @f3(%"b"* %0)
  ret i64 undef
}

define internal void @f3(%"b"* %this) align 2 {
entry:
  %this.addr = alloca %"b"*, align 8
  store %"b"* %this, %"b"** %this.addr, align 8
  %this1 = load %"b"*, %"b"** %this.addr, align 8
  %call = call i1 @f4(%"b"* %this1)
  ret void
}

define internal i1 @f4(%"b"* %this) align 2 {
entry:
  %this.addr = alloca %"b"*, align 8
  store %"b"* %this, %"b"** %this.addr, align 8
  %this1 = load %"b"*, %"b"** %this.addr, align 8
  %call = call %"a"* @f5(%"b"* %this1)
  ret i1 undef
}

define internal %"a"* @f5(%"b"* %this) align 2 {
entry:
  %this.addr = alloca %"b"*, align 8
  store %"b"* %this, %"b"** %this.addr, align 8
  %this1 = load %"b"*, %"b"** %this.addr, align 8
  %0 = bitcast %"b"* %this1 to %"a"*
  ret %"a"* %0
}

Command:
opt -O2 --attributor-enable=cgscc -S reduced.ll 

Not sure if it's a CGSCC bug or Attributor bug.

-- 
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/20210210/ec100185/attachment.html>


More information about the llvm-bugs mailing list