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

            Bug ID: 46745
           Summary: Assertion `(LocalChanged || (RefHash ==
                    StructuralHash(F))) && "Pass modifies its input and
                    doesn't report it."' for -loop-idiom pass
           Product: new-bugs
           Version: trunk
          Hardware: PC
                OS: Windows NT
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: new bugs
          Assignee: unassignedb...@nondot.org
          Reporter: david.stenb...@ericsson.com
                CC: htmldevelo...@gmail.com, llvm-bugs@lists.llvm.org,
                    sguel...@redhat.com

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

LLVM commit: 274332282cb4ce167de8e73fb9c59d2eecd67c25

Requires an expensive checks build to reproduce.

$ opt -loop-idiom -disable-basic-aa -S loop-idiom.ll
opt: ../lib/IR/LegacyPassManager.cpp:1591: bool
llvm::FPPassManager::runOnFunction(llvm::Function &): Assertion `(LocalChanged
|| (RefHash == StructuralHash(F))) && "Pass modifies its input and doesn't
report it."' failed.

After some very shallow troubleshooting, the issue seems to be that we return
false in this case:

  if (mayLoopAccessLocation(BasePtr, ModRefInfo::ModRef, CurLoop, BECount,      
                            StoreSize, *AA, Stores)) {                          
    Expander.clear();                                                           
    // If we generated new code for the base pointer, clean up.                 
    RecursivelyDeleteTriviallyDeadInstructions(BasePtr, TLI);                   
    return false;                                                               
  }

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

Reply via email to